Method and device for inducing motion information between temporal points of sub prediction unit

ABSTRACT

According to the present invention, there is provided A method of encoding a three-dimensional (3D) image, the method comprising: determining a prediction mode for a current block as an inter prediction mode; determining whether a reference block corresponding to the current block in a reference picture has motion information; when the reference block has the motion information, deriving motion information on the current block for each sub prediction block in the current block; and deriving a prediction sample for the current block based on the motion information on the current block.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of application Ser. No. 15/109,573,filed on Jul. 1, 2016, which claims the benefit under 35 USC 119(a) ofPCT Application No. PCT/KR2015/000050, filed on Jan. 5, 2015, whichclaims the benefit of Korean Patent Application Nos. 10-2014-0000527filed Jan. 3, 2014, 10-2014-0001531 filed Jan. 6, 2014, and10-2015-0000578 filed Jan. 5, 2015, in the Korean Intellectual PropertyOffice, the entire disclosures of which are incorporated herein byreference for all purposes.

TECHNICAL FIELD

The present invention relates to apparatuses and methods ofencoding/decoding 3D images, and more specifically, to imageencoding/decoding methods and apparatuses that derive inter-view motioninformation in parallel according to sub prediction units.

BACKGROUND ART

Growing IT industry has spread HD (high definition) broadcast servicesworldwide and more and more users are getting used to HD images.

Accordingly, the users are demanding higher-quality andhigher-resolution images and a number of organizations are spurringthemselves to develop next-generation imaging devices to live up to suchexpectations. As a result, users may experience full HD (FHD) and ultraHD (UHD) supportive images.

Users' demand goes one more step for 3D images that may offer a 3D feelor effects. Various organizations have developed 3D images to meetusers' such demand.

However, 3D images include depth map information as well as a true image(texture), and thus, have more data than 2D images. Accordingly,encoding/decoding 3D images with existing image encoding/decodingprocesses cannot exhibit sufficient encoding/decoding efficiency.

DETAILED DESCRIPTION OF INVENTION Technical Problem

An object of the present invention is to provide a device and method forderiving motion information of a block targeted for encoding/decoding.

Another object of the present invention is to provide a device andmethod for removing data dependency in deriving motion information of ablock targeted for encoding/decoding.

Still another object of the present invention is to provide a device andmethod for increasing image encoding/decoding efficiency by removingdata dependency in deriving motion information of a block targeted forencoding/decoding on a per-sub prediction unit basis.

Yet still another object of the present invention is to provide a deviceand method for increasing image encoding/decoding efficiency usingmotion information of a reference block when deriving motion informationof a block targeted for encoding/decoding on a per-sub prediction unitbasis.

Technical Solution

According to an embodiment of the present invention, there may beprovided a method of encoding a three-dimensional (3D) image, the methodcomprising: determining a prediction mode for a current block as aninter prediction mode;

determining whether a reference block corresponding to the current blockin a reference picture has motion information;when the reference block has the motion information, deriving motioninformation on the current block for each sub prediction block in thecurrent block; andderiving a prediction sample for the current block based on the motioninformation on the current block.

Here, the current block and the reference block may be predictionblocks.

Here, the motion information on the reference block may be positioned ata center of the reference block.

Here, in the step of the deriving the motion information on the currentblock for each sub prediction block in the current block, if a subprediction block in the reference block corresponding to a subprediction block in the current block has motion information, the motioninformation on the sub prediction block of the current block may bederived as the motion information present in the sub prediction block ofthe reference block.

Here, if a sub prediction block in the reference block corresponding toa sub prediction block in the current block has not motion information,the motion information on the sub prediction block of the current blockmay be derived as the motion information of the reference block.

According to another embodiment of the present invention, there may beprovided an apparatus of encoding a three-dimensional (3D) image, theapparatus comprising: a storage module determining a prediction mode fora current block as an inter prediction mode and determining whether areference block corresponding to the current block in a referencepicture has motion information; a deriving module, when the referenceblock has the motion information, deriving motion information on thecurrent block for each sub prediction block in the current block andderiving a prediction sample for the current block based on the motioninformation on the current block.

Here, the current block and the reference block may be predictionblocks.

Here, the motion information on the reference block may be positioned ata center of the reference block.

Here, in the deriving module, if a sub prediction block in the referenceblock corresponding to a sub prediction block in the current block hasmotion information, the motion information on the sub prediction blockof the currentblock may be derived as the motion information present inthe sub prediction block of the reference block.

Here, if a sub prediction block in the reference block corresponding toa sub prediction block in the current block has not motion information,the motion information on the sub prediction block of the current blockmay be derived as the motion information of the reference block.

According to still another embodiment of the present invention, theremay be provided A method of decoding a three-dimensional (3D) image, themethod comprising: determining a prediction mode for a current block asan inter prediction mode; determining whether a reference blockcorresponding to the current block in a reference picture has motioninformation; when the reference block has the motion information,deriving motion information on the current block for each sub predictionblock in the current block; and deriving a prediction sample for thecurrent block based on the motion information on the current block.

Here, the current block and the reference block may be predictionblocks.

Here, the motion information on the reference block may be positioned ata center of the reference block.

Here, in the step of the deriving the motion information on the currentblock for each sub prediction block in the current block, if a subprediction block in the reference block corresponding to a subprediction block in the current block has motion information, the motioninformation on the sub prediction block of the current block may bederived as the motion information present in the sub prediction block ofthe reference block.

Here, if a sub prediction block in the reference block corresponding toa sub prediction block in the current block has not motion information,the motion information on the sub prediction block of the current blockmay be derived as the motion information of the reference block.

According to yet still another embodiment of the present invention,there may be provided An apparatus of decoding a three-dimensional (3D)image, the apparatus comprising: a storage module determining aprediction mode for a current block as an inter prediction mode anddetermining whether a reference block corresponding to the current blockin a reference picture has motion information; and a deriving module,when the reference block has the motion information, deriving motioninformation on the current block for each sub prediction block in thecurrent block and deriving a prediction sample for the current blockbased on the motion information on the current block.

Here, the current block and the reference block may be predictionblocks.

Here, the motion information on the reference block may be positioned ata center of the reference block.

Here, in the deriving module, if a sub prediction block in the referenceblock corresponding to a sub prediction block in the current block hasmotion information, the motion information on the sub prediction blockof the current block may be derived as the motion information present inthe sub prediction block of the reference block.

Here, if a sub prediction block in the reference block corresponding toa sub prediction block in the current block has not motion information,the motion information on the sub prediction block of the current blockmay be derived as the motion information of the reference block.

Advantageous Effects

The present invention may derive motion information of a block targetedfor encoding/decoding.

The present invention may remove data dependency in deriving motioninformation of a block targeted for encoding/decoding.

The present invention may increase image encoding/decoding efficiency byremoving data dependency in deriving motion information of a blocktargeted for encoding/decoding on a per-sub prediction unit basis.

The present invention may increase image encoding/decoding efficiencyusing motion information of a reference block by removing datadependency in deriving motion information of a block targeted forencoding/decoding on a per-sub prediction unit basis.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a view schematically illustrating a basic structure of a3-dimensional (3D) image system.

FIG. 2 is a view illustrating an example of a “balloons” image and anexample of a depth information map image.

FIG. 3 is a view schematically illustrating a structure in which animageis split upon encoding and decoding the image.

FIG. 4 illustrates prediction units that may be included in a codingunit (CU).

FIG. 5 illustrates an example of an inter view prediction structure in a3D image codec.

FIG. 6 illustrates an example of a process of encoding and/or decoding atrueimage (texture view) and a depth information map (depth view) in a3D image encoder and/or decoder.

FIG. 7 is a block diagram illustrating a configuration of an imageencoder according to an embodiment of the present invention.

FIG. 8 is a block diagram illustrating a configuration of an imagedecoder according to an embodiment of the present invention.

FIG. 9 is a view illustrating an exemplary prediction structure for a 3Dimage codec.

FIG. 10 illustrates an example in which neighboring blocks are used toconfigure a merge candidate list for a current block.

FIG. 11 is a view illustrating an exemplary process of deriving motioninformation on a current block using motion information at a neighboringview.

FIG. 12 is a view illustrating an example in which one prediction unit(PU) is split into several sub prediction units.

FIG. 13 is a view illustrating an exemplary process of deriving motioninformation on a current block using a reference block.

FIG. 14 is a view illustrating an exemplary reference block used toderive motion information on a current block.

FIGS. 15a to 15e are views schematically illustrating an exemplaryprocess of deriving motion information using motion information storedin a storage space.

FIGS. 16a to 16g are views schematically illustrating another exemplaryprocess of deriving motion information using motion information storedin a storage space.

FIG. 17 is a flowchart illustrating a method of deriving motioninformation on a sub prediction unit of a current block using a subprediction unit of a reference block, according to an embodiment of thepresent invention.

FIG. 18 is a view illustrating an exemplary process of deriving inparallel information on a sub prediction unit of a current block using asub prediction unit of a reference block.

FIG. 19 is a view illustrating an exemplary process of discovering anavailable sub prediction unit when the available sub prediction unit ispositioned at the rightmost and lowermost end of a reference block.

FIG. 20 is a view schematically illustrating times required to derivemotion information on a per-sub prediction unit basis.

FIG. 21 is a block diagram illustrating a configuration of an interprediction module to which the present invention applies.

FIG. 22 is a flowchart schematically illustrating a method of derivingmotion information on a sub prediction unit of a current block using areference block, according to an embodiment of the present invention.

FIG. 23 is a flowchart schematically illustrating a method of derivingmotion information on a sub prediction unit of a current block,according to another embodiment of the present invention.

FIG. 24 is a view illustrating an exemplary process of deriving motioninformation on a sub prediction unit of a current block using motioninformation at a position.

FIG. 25 is a flowchart illustrating a method of deriving motioninformation on a sub prediction unit of a current block using a motioninformation value according to another embodiment of the presentinvention.

FIG. 26 is a view illustrating an exemplary process of deriving motioninformation on a sub prediction unit of a current block using somemotion information.

FIG. 27 is a view schematically illustrating times required to derivemotion information according to the present invention.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Hereinafter, embodiments of the present invention are described indetail with reference to the accompanying drawings. When determined tomake the subject matter of the present disclosure unclear, a detaileddescription of relevant know configurations or functions are omitted.

When a component is “connected to” or “coupled to” another component,the component may be directly connected or coupled to the othercomponent, or other components may intervene. As used herein, thepresent invention “includes” or “comprises” a particular component, thepresent invention does not exclude other components, and ratheradditional components may also be included in the technical spirit ofthe present invention or embodiments of the present invention.

The terms “first” and “second” may be used to describe variouscomponents, but the components are not limited by the terms. These termsare used only to distinguish one component from another. For example,without departing from the scope of the present invention, a firstcomponent may be denoted a second component, and a second component maybe denoted a first component.

The components as used herein may be independently shown to representtheir respective distinct features, but this does not mean that eachcomponent should be configured as a separate hardware or software unit.In other words, the components are shown separately from each other forease of description. At least two of the components may be combined toconfigure a single component, or each component may be split into aplurality of components to perform a function. Such combination orseparation also belongs to the scope of the present invention withoutdeparting from the gist of the present invention.

Some components may be optional components for enhancing performancerather than inevitable components for performing essential functions ofthe present invention.

The present invention may be implemented only with essential componentsto realize the gist of the present invention excluding components usedto enhance performance, and such configuration also belongs to the scopeof the present invention.

A 3D image offers a stereoscopic effect through a 3D stereoscopicdisplay as if the user sees and feels in the real-life world. In thisconnection, a joint standardization group, JCT-3V (The JointCollaborative Team on 3D Image Coding Extension Development), of MPEG(Moving Picture Experts Group) in ISO/IEC and VCEG (Video Coding ExpertsGroup) in ITU-T are underway for 3D image standardization.

FIG. 1 is a view schematically illustrating a basic structure of a3-dimensional (3D) image system.

Referring to FIG. 1, the 3D video (3VD) system may include a sender anda receiver. In this case, the 3D video system of FIG. 1 may be a basic3D video system as considered in 3D image standards that may includestandards regarding advanced data formats and their related technologiesthat may support playback of autostereoscopic images as well asstereoscopic images using a texture and its corresponding depthinformation map.

The sender may generate a multi-view image content. Specifically, thesender may generate image information using a stereo camera and amulti-view camera and a depth information map (or depth view) using adepth information camera. The sender may convert a 2D image into a 3Dimage using a transforming device. The sender may generate an N(≥2)-view (i.e., multi-view) image content using the generated imageinformation and the depth information map. In this case, the N-viewimage content may contain N-view image information, its depth mapinformation, and camera-related additional information. The N-view imagecontent may be compressed by a 3D image encoder using a multi-view imageencoding scheme, and the compressed image content (a bit stream) may betransmitted through a network to a terminal of the receiver.

The receiver may decode the image content received from the sender andmay provide the multi-view image. Specifically, an image decoder (e.g.,a 3D image decoder, a stereo image decoder, or a 2D image decoder) ofthe receiver may decode the received bit stream using a multi-view imagedecoding scheme to restore the bit stream into the N-view image. In thiscase, it may generate N (or more)-view virtual view images using therestored N-view image and a depth image-based rendering (DIBR) process.The generated N (or more)-view virtual view images are played by various3D displays (e.g., an N-view display, a stereo display, or a 2Ddisplay), providing the user with a 3D effect.

FIG. 2 is a view illustrating an example of a “balloons” image and anexample of a depth information map image.

FIG. 2(a) illustrates a “balloons” image that is adopted in an MPEG (aninternational standardization organization) 3D image encoding standard.FIG. 2(b) illustrates a depth information map image corresponding to the“balloons” image shown in FIG. 2(a). The depth information map image isthe one obtained by representing depth information shown on the screenin eight bits per pixel.

The depth information map is used for generating virtual view images,and the depth information map is the one obtained by representing thedistance between a camera and a true object in the real-life world(depth information corresponding to each pixel at the same resolution asthe texture) in a predetermined number of bits. In this case, the depthinformation map may be obtained using the depth information map cameraor using a true common image (texture).

The depth information map obtained using the depth information mapcamera offers high-reliable depth information primarily for a standstillobject or scene, but the depth information map camera operates onlywithin a predetermined distance. In this case, the depth information mapcamera may utilize a measuring scheme using a laser beam or structuredlight or based on time-of-flight of light (TFL).

The depth information map may be generated using atrue common image(texture) and a disparity vector as well. The disparity vector meansinformation representing the difference in view between two commonimages. The disparity vector may be obtained by comparing a pixel at thecurrent view and pixels at other views to discover the most similar oneto the current view pixel and measuring the distance between the currentview pixel and the most similar pixel.

The texture and its depth information map may be an image(s) obtained byone or more cameras. The images obtained by several cameras may beindependently encoded and may be encoded/decoded using a typical 2Dencoding/decoding codec. The images obtained by several cameras have acorrelation between their views, and for higher encoding efficiency, maybe thus encoded using prediction between the different views.

FIG. 3 is a view schematically illustrating a structure in which animage is split upon encoding and decoding the image.

For efficient splitting, an image may be encoded and decoded for eachcoding unit (CU). The term “unit” refers to a block including a syntaxelement and image samples. A “unit is split” may mean that a blockcorresponding to the unit is split.

Referring to FIG. 3, an image 300 is sequentially split into largestcoding units (LCU), and the split structure of each LCU is determined.As used herein, “LCU” may mean a coding tree unit (CTU). The splitstructure may mean a distribution of coding units (CU) for efficientlyencoding the image in each LCU 310, and such distribution may bedetermined depending on whether to split one CU into four CUs eachreduced in size by ½ the size of the CU in horizontal and verticaldirections each. In the same manner, the split CU may be recursivelysplit into four CUs each's size reduced to ½ thereof in horizontal andvertical directions each.

In this case, the splitting of a CU may be recursively performed to apredetermined depth. Depth information refers to information indicatingthe size of a CU and may be stored for each CU. For example, the depthof an LCU may be 0, and the depth of a smallest coding unit (SCU) may bea predetermined largest depth. Here, the LCU is a coding unit with thelargest size as mentioned above, and the SCU is a coding unit with thesmallest size.

Whenever an LCU 310 is split by half in horizontal and verticaldirections each, the depth of the CU is increased by one. For example,if the size of a CU is 2N×2N at a certain depth L, the CU, if not split,has a size of 2N×2N, and if split, its size is reduced to N×N. In thiscase, the depth of the N×N-sized CU turns L+1. In other words, N,corresponding to the size of the CU, is reduced by half each time thedepth is increased by one.

Referring to FIG. 3, the size of an LCU with a smallest depth of 0 maybe 64×64 pixels, and the size of an SCU with a smallest depth of 3 maybe 8×8 pixels. In this case, the depth of a CU (LCU) with 64×64 pixelsmay be represented as 0, a CU with 32×32 pixels as 1, a CU with 16×16pixels as 2, and a CU (SCU) with 8×8 pixels as 3.

Further, information as to whether to split a particular CU may berepresented through one-bit split information of the CU. The splitinformation may be contained in all other CUs than SCUs. For example, ifa CU is not split, 0 may be retained in the split information of the CU,and if split, 1 may be retained in the split information of the CU.

FIG. 4 illustrates prediction units that may be included in a codingunit (CU).

Among the CUs split from an LCU, a CU that is subjected to no furthersplitting may be split or partitioned into one more prediction units.

A prediction unit (hereinafter, “PU”) is a basic unit in whichprediction is conducted. A prediction unit is encoded and decoded inskip mode, inter mode, or intra mode. A prediction unit may bepartitioned in various manners depending on the modes.

Referring to FIG. 4, the skip mode may support a 2N×2N mode 410 havingthe same size as a CU without splitting the CU.

The inter mode may support eight partitioned types for a CU, forexample, a 2N×2N mode 410, a 2N×N mode 415, an N×2N mode 420, an N×Nmode 425, a 2N×nU mode 430, a 2N×nD mode 435, an nL×2N mode 440, and anNR×2N mode 445.

The intra mode may support a 2N×2N mode 410 and an N×N mode 425 for aCU.

FIG. 5 illustrates an example of an inter view prediction structure in a3D image codec.

Inter-view prediction for view 1 and view 2 may be conducted using view0 as a reference image, and view 0 should be encoded earlier than view 1and view 2.

In this case, view 0 may be encoded independently from other views, andthus, view 0 is referred to as an independent view. In contrast, view 1and view 2 that should use view 0 as reference image are referred to asdependent views. An independent view image may be encoded using atypical 2D image codec. On the contrary, dependent view images need gothrough inter view prediction, and thus, these views may be encodedusing a 3D image codec equipped with an inter view prediction process.

For increased encoded efficiency, view 1 and view 2 may be encoded usinga depth information map. For example, a texture and a depth informationmap, when encoded, may be encoded and/or decoded independently from eachother. Or, a texture and a depth information map, when encoded, may beencoded and/or decoded dependently upon each other as shown in FIG. 6.

FIG. 6 illustrates an example of a process of encoding and/or decoding atrueimage (texture view) and a depth information map (depth view) in a3D image encoder and/or decoder.

Referring to FIG. 6, the 3D image encoder may include a texture encoder(texture encoder) for encoding a trueimage (texture view) and a depthinformation map encoder (depth encoder) for encoding a depth informationmap (depth view).

In this case, the texture encoder may encode the texture using the depthinformation map encoded by the depth information map encoder. Incontrast, the depth information map encoder may encode the depthinformation map using the texture encoded by the texture encoder.

The 3D image decoder may include a trueimage decoder (texture decoder)for decoding a texture and a depth information map decoder for decodinga depth information map.

In this case, the texture decoder may decode the texture using the depthinformation map decoded by the depth information map decoder. Incontrast, the depth information map decoder may decode the depthinformation map using the texture decoded by the texture decoder.

FIG. 7 is a block diagram illustrating a configuration of an imageencoder according to an embodiment of the present invention.

FIG. 7 illustrates an example image encoder applicable to a multi-viewstructure that may be implemented by extending a single view-structuredimage encoder. In this case, the image encoder of FIG. 7 may be used ina texture encoder and/or depth information map encoder as shown in FIG.6, and the encoder may mean an encoding device.

Referring to FIG. 7, the image encoder 700 includes an inter predictionmodule 710, an intra prediction module 720, a switch 715, a subtractor725, a transform module 730, a quantization module 740, an entropyencoding unit 750, an dequantization module 760, an inverse transformmodule 770, an adder 775, a filter 780, and a reference picture buffer790.

The image encoder 700 may perform encoding on an input image in intramode or inter mode to output a bitstream.

Intra prediction means intra picture prediction, and inter predictionmeans inter picture or inter view prediction. In intra mode, the switch715 switches to intra mode, and in inter mode, the switch 715 switchesto inter mode.

The image encoder 700 may generate a prediction block for a block(current block) of the input picture and then encode a differentialbetween the current block and the prediction block.

In intra mode, the intra prediction module 720 may use as its referencepixel a pixel value of an already encoded neighboring block of thecurrent block. The intra prediction module 720 may generate predictionsamples for the current block using the reference pixel.

In inter mode, the inter prediction module 710 may obtain a motionvector specifying a reference block corresponding to the input block(current block) in a reference picture stored in the reference picturebuffer 790. The inter prediction module 710 may generate the predictionblock for the current block by performing motion compensation using thereference picture stored in the reference picture buffer 790 and themotion vector.

In a multi-view structure, inter prediction applying to inter mode mayinclude inter view prediction. The inter prediction module 710 mayconfigure an inter view reference picture by sampling a reference viewpicture. The inter prediction module 710 may conduct inter viewprediction using a reference picture list including the inter viewreference picture. A reference relation between views may be signaledthrough information specifying inter view dependency.

Meanwhile, in case the current view picture and the reference viewpicture have the same size, sampling applying to the reference viewpicture may mean generation of a reference sample by sample copying orinterpolation from the reference view picture. In case the current viewpicture and the reference view picture have different sizes, samplingapplying to the reference view picture may mean upsampling ordownsampling. For example, in case views have different resolutions, arestored picture of the reference view may be upsampled to configure aninter view reference picture.

Which view picture is to be used to configure an inter view referencepicture may be determined considering, e.g., encoding costs. The encodermay send to a decoding device information specifying a view to which apicture to be used as an inter view reference picture belongs.

A picture used to predict the current block in a view referenced ininter view prediction—that is, reference view—may be the same as apicture of the same access unit (AU) as the current picture (picturetargeted for prediction in the current view).

The subtractor 725 may generate a residual block (residual signal) by adifferential between the current block and the prediction block.

The transform module 730 transforms the residual block into a transformcoefficient. In transform skip mode, the transform module 730 may skipthe conversion of the residual block.

The quantization module 740 quantizes the transform coefficient into aquantized coefficient according to quantization parameters.

The entropy encoding unit 750 entropy-encodes the values obtained by thequantization module 740 or encoding parameters obtained in the course ofencoding into a bitstream according to a probability distribution. Theentropy encoding unit 750 may also entropy-encode information (e.g.,syntax element) for image decoding in addition to the pixel informationof the image.

The encoding parameters may include, as information necessary forencoding and decoding, information inferable in the course of encodingor decoding, as well as information such as syntax element encoded bythe encoder and transferred to the decoding device.

The residual signal may mean a difference between the original signaland the prediction signal, a signal obtained by transforming thedifference between the original signal and the prediction signal, or asignal obtained by transforming the difference between the originalsignal and the prediction signal and quantizing the transformeddifference. From a block perspective, the residual signal may be denoteda residual block.

In case entropy encoding applies, symbols may be represented in such away that a symbol with a higher chance of occurrence is assigned fewerbits while another with a lower chance of occurrence is assigned morebits, and accordingly, the size of a bitstream for symbols targeted forencoding may be reduced. As such, image encoding may have an increasedcompression capability through entropy encoding.

Entropy encoding may employ an encoding scheme such as exponentialGolomb, context-adaptive variable length coding (CAVLC), orcontext-adaptive binary arithmetic coding (CABAC). For example, theentropy encoding unit 750 may perform entropy encoding using a variablelength coding/code (VLC) table. The entropy encoding unit 750 may derivea binarization method and a target symbol and a probability model of thetarget symbol/bin and may perform entropy encoding using the derivedbinarization method and probability model.

The quantized coefficient may be inverse-quantized by the dequantizationmodule 760 and may be inverse transformed by the inverse transformmodule 770. The inverse-quantized and inverse-transformed coefficient isadded to the prediction block by the adder 775, thus producing arestored block.

The restored block goes through the filter 780. The filter 780 may applyat least one or more of a deblocking filter, a sample adaptive offset(SAO), and an adaptive loop filter (ALF) to the restored block orrestored picture. The restored block, after having gone through thefilter 780, may be stored in the reference picture buffer 790.

FIG. 8 is a block diagram illustrating a configuration of an imagedecoder according to an embodiment of the present invention.

FIG. 8 illustrates an example image decoder applicable to a multi-viewstructure that may be implemented by extending a single view-structuredimage decoder.

In this case, the image decoder of FIG. 8 may be used in a texturedecoder and/or depth information map decoder as shown in FIG. 6. Forease of description, as used herein, the terms “decrypting” and“decoding” may be interchangeably used, or the terms “decoding device”and “decoder” may be interchangeably used.

Referring to FIG. 8, the image decoder 800 includes an entropy decodingunit 810, an dequantization module 820, an inverse-transform module 830,an intra prediction module 840, an inter prediction module 850, a filter860, and a reference picture buffer 870.

The image decoder 800 may receive the bitstream from the encoder, decodethe bitstream in intra mode or inter mode, and output a reconstructedimage, i.e., a reconstructed image.

In intra mode, the switch may switch to intra prediction, and in intermode, the switch may switch to inter prediction.

The image decoder 800 may obtain a residual block restored from thereceived bitstream, generate a prediction block, and add the restoredresidual block and the prediction block to generate a reconstructedblock, i.e. restored block.

The entropy decoding unit 810 may entropy-decode the received bitstreamaccording to a probability distribution into information such as aquantized coefficient and syntax element.

The quantized coefficient is inverse-quantized by the dequantizationmodule 820 and is inverse transformed by the inverse transform module830. The quantized coefficient may beinverse-quantized/inverse-transformed into a restored residual block.

In intra mode, the intra prediction module 840 may generate a predictionblock for the current block using a pixel value of an already encodedneighboring block of the current block.

In inter mode, the inter prediction module 850 may generate theprediction block for the current block by performing motion compensationusing the reference picture stored in the reference picture buffer 870and the motion vector.

In a multi-view structure, inter prediction applying to inter mode mayinclude inter view prediction. The inter prediction module 850 mayconfigure an inter view reference picture by sampling a reference viewpicture. The inter prediction module 850 may conduct inter viewprediction using a reference picture list including the inter viewreference picture. A reference relation between views may be signaledthrough information specifying inter view dependency.

Meanwhile, in case the current view picture (current picture) and thereference view picture have the same size, sampling applying to thereference view picture may mean generation of a reference sample bysample copying or interpolation from the reference view picture. In casethe current view picture and the reference view picture have differentsizes, sampling applying to the reference view picture may meanupsampling or downsampling.

For example, in case inter view prediction applies to views withdifferent resolutions, a restored picture of the reference view may beupsampled to configure an inter view reference picture.

In this case, information specifying a view to which a picture to beused as an inter view reference picture belongs may be transmitted fromthe encoder to the decoder.

A picture used to predict the current block in a view referenced ininter view prediction—that is, reference view—may be the same as apicture of the same access unit (AU) as the current picture (picturetargeted for prediction in the current view).

The restored residual block and the prediction block are added by theadder 855 into a restored block. In other words, the residual sample andthe prediction sample are added to each other into a restored sample orrestored picture.

The restored picture is filtered by the filter 860. The filter 860 mayapply at least one or more of a deblocking filter, an SAO, and an ALF tothe restored block or restored picture. The filter 860 outputs areconstructed (modified) or filtered restored picture (reconstructedpicture). The reconstructed image is stored in the reference picturebuffer 870 for use in inter prediction.

Although in the embodiment described in connection with FIGS. 7 and 8the modules perform their respective functions different from eachother, the present invention is not limited thereto. For example, onemodule may perform two or more functions. For example, the respectiveoperations of the intra prediction module and the inter predictionmodules as shown in FIGS. 7 and 8 may be carried out by one module (apredicting unit).

Meanwhile, as described above in connection with FIGS. 7 and 8, oneencoder/decoder performs encoding/decoding on all of the multiple views.However, this is merely for ease of description, and separateencoders/decoders may be configured for the multiple views,respectively.

In such case, the encoder/decoder for the current view may performencoding/decoding on the current view using information regarding otherview. For example, the predicting unit (inter prediction module) for thecurrent view may perform intra prediction or inter prediction on thecurrent block using the pixel information or restored pictureinformation of other view.

Although inter view prediction is described herein, a current layer maybe encoded/decoded using information on other view regardless of whetheran encoder/decoder is configured for each view or one device processesmultiple views.

The description of views according to the present invention may applylikewise to layers supportive to scalability. For example, the view asdescribed herein may be a layer.

FIG. 9 is a view illustrating an exemplary prediction structure for a 3Dimage codec. For ease of description, FIG. 9 illustrates a predictionstructure for encoding textures obtained by three cameras and depthinformation maps respectively corresponding to the textures.

As shown in FIG. 9, the three textures respectively obtained from thethree cameras are denoted T0, T1, and T2 according to views, and thethree depth information maps respectively corresponding to the threetextures are denoted D0, D1, and D2 according to the views. Here, T0 andD0 are images obtained at view 0, T1 and D1 at view 1, and T2 and D2 atview 2. In this case, the squares shown in FIG. 9 are images (pictures).

The images (pictures) are classified into I pictures (intra pictures), Ppictures (uni-prediction pictures), and B pictures (bi-predictionpictures) depending on encoding/decoding types, and each picture may beencoded/decoded depending on its encoding/decoding type. For I pictures,images themselves are encoded without going through inter prediction.For P pictures, only uni-directionally present reference images may besubjected to inter prediction, and for B pictures, bi-directionallypresent reference images may be subjected to inter prediction. In thiscase, the arrows shown in FIG. 9 denote directions of prediction. Inother words, a texture and its depth information map may beco-dependently encoded/decoded depending on prediction directions.

Motion information on the current block is needed to encode/decode animage through inter prediction. To infer the motion information on thecurrent block, the following may come in use: a method using motioninformation on a block adjacent to the current block, a method using atemporal correlation within the same time, and a method using aninter-view correlation at a neighboring time. The above-described interprediction methods may be used in combination for one picture. Here, thecurrent block refers to a block where prediction is performed. Themotion information may mean a motion vector, a reference image number,and/or a prediction direction (e.g., whether it is uni-directionalprediction or bi-directional prediction, whether it uses a temporalcorrelation, or whether an inter-view correlation is used, etc.).

In this case, the prediction direction may be typically classified intouni-directional prediction or bi-directional prediction depending onwhether a reference picture list (RefPicList) is used or not. Thebi-directional prediction is classified into forward prediction(Pred_L0: Prediction L0) using a forward reference picture list (LIST 0,L0) and backward prediction (Pred_L1: Prediction L1) using a backwardreference picture list (LIST 1, L1). Further, the bi-directionalprediction Pred_BI: Prediction BI) using both the forward referencepicture list (LIST 0) and the backward reference picture list (LIST 1)may indicate that there is both forward prediction and backwardprediction. Even the case where the forward reference picture list (LIST0) is copied to the backward reference picture list (LIST 1) so that twoprocesses of forward prediction are present may also belong to thecategory of bi-directional prediction.

A prediction direction may be defined using predFlagL0 and predFlagL1.In this case, predFlagL0 is an indicator indicating whether the forwardreference picture list (List 0) is used, and predFlag1 is an indicatorindicating whether the backward reference picture list (List 1) is used.For example, in the case of uni-directional prediction and forwardprediction, predFlagL0 may be ‘1’, and predFlagL1 may be ‘0’; in thecase of uni-directional prediction and backward prediction, predFlagL0‘0,’ and predFlagL1 ‘1’;’ and in the case of bi-directional prediction,predFlagL0 ‘1,’ and predFlagL1 ‘ 1.’

FIG. 10 illustrates an example in which neighboring blocks are used toconfigure a merge candidate list for a current block.

Merge mode is a method for performing inter prediction. Merge mode mayemploy motion information on neighboring blocks of a current block asmotion information on the current block (for example, at least one of amotion vector, a reference picture list, and a reference picture index).In this case, the use of the motion information on the neighboringblocks as motion information on the current block is referred to asmerging, motion merging, or merging motion.

In merge mode, per-coding unit (CU) merging motion and per-predictionunit (PU) merging motion are possible.

The case where merging motion is made on a per-block (e.g., CU or PU)basis (for ease of description, hereinafter “block”) requiresinformation regarding whether the merging motion is performed per blockpartition and information regarding which one of neighboring blocks ofthe current block the merging motion is done with.

A merge candidate list may be configured to perform merging motion.

The merge candidate list refers to a list of pieces of motioninformation, and this may be generated before merge mode is performed.Here, the motion information of the merge candidate list may be motioninformation on the neighboring blocks of the current block or motioninformation newly created by combining the pieces of motion informationalready present in the merge candidate list. The motion information onthe neighboring blocks (for example, a motion vector and/or referencepicture index) may be motion information specified by the neighboringblocks or motion information stored in the neighboring blocks (or usedto decode the neighboring blocks).

In this case, the neighboring blocks, as shown in FIG. 10, may includeneighboring blocks A, B, C, D and E positioned spatially adjacent to thecurrent block and a co-located candidate block H or M temporallycorresponding to the current block. The co-located candidate blockrefers to a block located at a corresponding position in a co-locatedpicture temporally corresponding to the current picture including thecurrent block. If the H block is available in the co-located picture,the H block may be determined as the co-located candidate block, and ifunavailable, the M block in the co-located picture may be determined asthe co-located candidate block.

Upon configuring the merge candidate list, it is determined whether themotion information on the neighboring blocks (A, B, C, D, and E) and theco-located candidate block (H or M) may be used as merge candidate toconfigure the merge candidate list of the current block. In other words,motion information on blocks available for inter prediction of thecurrent block may be added to the merge candidate list as mergecandidate.

For example, as a method for configuring a merge candidate list for an Xblock, 1) in case a neighboring block A is available, the neighboringblock A is added to the merge candidate list. 2) thereafter, only whenthe motion information on neighboring block B is not the same as themotion information on neighboring block A, neighboring block B is addedto the merge candidate list. 3) in the same manner, only when the motioninformation on neighboring block C differs from the motion informationon neighboring block B, neighboring block C is added to the mergecandidate list, and 4) only when the motion information on neighboringblock D differs from the motion information on neighboring block C,neighboring block D is added to the merge candidate list. Further, 5)only when the motion information on neighboring block E is differentfrom the motion information on neighboring block D, neighboring block Emay be added to the merge candidate list, and 6) finally, neighboringblock H (or M) is added to the merge candidate list. In sum, theneighboring blocks may be added to the merge candidate list in the orderof A→B→C→D→E→H(or M). Here, the same motion information may mean usingthe same motion vector, the same reference picture, and the sameprediction direction (uni-directional or bi-directional).

The phrases “adding a neighboring block to a merge candidate list asmerge candidate” and “adding motion information to a merge candidatelist as merge candidate” are mixed up herein for ease of description,although the two phrases are substantially the same in meaning. Forexample, a neighboring block as merge candidate may mean motioninformation on the block.

FIG. 11 is a view illustrating an exemplary process of deriving motioninformation on a current block using motion information at a neighboringview.

In connection with FIG. 11, only one view is used to derive the motioninformation on the current block merely for ease of description.However, there may be two or more neighboring views.

Referring to FIG. 11, a 3D video system may use motion information at aneighboring view in order to efficiently encode/decode motioninformation. Specifically, the current block shown in FIG. 11 (the blockat current location X) searches a target block (reference locationX_(R)) located at a neighboring view in order to derive the motioninformation on the current block. In this case, the target block at theneighboring view means a block corresponding to the current block. Sinceonly a difference in current picture between the current view and thereference view lies in the position of cameras, the target block at theneighboring view may be derived from the disparity vector (DV) asdescribed above.

FIG. 12 is a view illustrating an example in which one prediction unit(PU) is split into several sub prediction units.

In the example illustrated in FIG. 12, a prediction unit with a size of64×64 is divided into sub prediction units each with a size of 8×8. Forease of description in connection with FIG. 12, the size of theprediction unit is 64×64, but without limited thereto, the size may be32×32, 16×16, 8×8, or 4×4. In a 3D video system, one prediction unit maybe split into a number of sub prediction units. In this case, derivationof motion information using a disparity vector is carried out on aper-sub prediction unit basis. The sub prediction unit may have apredetermined size (e.g., 4×4, 8×8, or 16×16), and the size of the subprediction unit may be designated upon encoding. Information on the sizeof the sub prediction unit may be included and signaled in an imageparameter set (VPS) extension syntax.

FIG. 13 is a view illustrating an exemplary process of deriving motioninformation on a current block using a reference block.

The process of deriving motion information on a current block meanssetting up the motion information present in the reference block withthe motion information on the current block. However, a 3D video systemmay derive motion information on a per-sub prediction unit basis for thecurrent block X positioned in the current picture at the current view inorder to efficiently encode/decode motion information.

In other words, the 3D video system may set the motion informationpresent in the sub prediction unit of the reference block X_(R) to themotion information on the sub prediction unit of the current block X. Inthis case, the reference block X_(R) may mean a reference block X_(R)positioned in the current picture at the reference view. A specificprocess of deriving motion information is described below.

FIG. 14 is a view illustrating an exemplary reference block used toderive motion information on a current block.

Referring to FIG. 14, the reference block may mean a PU, and onereference block may include a total of 16 sub prediction units. In thiscase, motion information on each sub prediction unit in the currentblock may be derived from motion information present in the subprediction units of the reference block.

Now described is a method of deriving motion information on subprediction units of a current block using a reference block withreference to FIGS. 15a to 15e and FIGS. 16a to 16 g.

FIGS. 15a to 15e are views schematically illustrating an exemplaryprocess of deriving motion information using motion information storedin a storage space. In this case, the reference block used in FIGS. 15ato 15e may be a reference block as shown in FIG. 14.

When the sub prediction unit of the current block brings the mi on thesub prediction units of the reference block, all of the sub predictionunit of the reference block do not have motion information. In otherwords, there might be some sub prediction units of the reference blockfrom which motion information cannot be brought up. Accordingly, in casethere are sub prediction units from which motion information cannot beobtained, the mi on a previous or subsequent sub prediction unit of thecurrently referenced sub prediction unit may be put to use in order tomake up for failure to derive motion information from the sub predictionunit of the current block. For example, the motion information on a subprediction unit available in the reference block may be previouslystored in preparation for the case where there is some other subprediction unit of the reference block from which motion informationcannot be derived, so that the previously stored motion information maybe inserted into the sub prediction unit of the current block to derivethe motion information on the current block.

For a better understanding of the above-described method, each step ofan exemplary method for deriving motion information on a sub predictionunit of a current block when a first sub prediction unit of a referenceblock has its motion information while a second or its subsequent subprediction units of the reference block may not is described below withreference to the drawings.

FIG. 15a is a view illustrating the initial state of sub predictionunits of a current block and a storage space.

Referring to FIG. 15a , Ref denotes a reference block, and Ref 0, 1, 2,and 3 respectively denote sub prediction units in the reference block.That is, Ref 0 means sub prediction unit 0 of the reference block (afirst sub prediction unit of the reference block), Ref 1 sub predictionunit 1 of the reference block (a second sub prediction unit of thereference block), Ref 2 sub prediction unit 2 of the reference block (athird sub prediction unit of the reference block), and Ref 3 subprediction unit 3 of the reference block (a fourth sub prediction unitof the reference block). Cur denotes the current block, and Cur 0, 1, 2,and 3 respectively denote sub prediction units in the current block.That is, Cur 0 means sub prediction unit 0 of the current block (a firstsub prediction unit of the current block), Cur 1 sub prediction unit 1of the current block (a second sub prediction unit of the currentblock), Cur 2 sub prediction unit 2 of the current block (a third subprediction unit of the current block), and Cur 3 sub prediction unit 3(a fourth sub prediction unit of the current block).

In this case, ‘X’ marked in Ref 2 of FIG. 15a denotes motion informationbeing impossible to derive using sub prediction unit 2 of the referenceblock.

FIG. 15b shows a first step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 15b , motion information is derived from subprediction unit 0 of the reference block for sub prediction unit 0 ofthe current block. In this case, since motion information may be derivedfrom sub prediction unit 0 of the reference block, motion information onsub prediction unit 0 of the reference block is stored in the storagespace. In this case, the motion information stored in the storage spacemay be defined as motion information 0, which is used when motioninformation cannot be derived from some other sub prediction units ofthe reference block.

FIG. 15c shows a second step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 15c , motion information is derived from subprediction unit 1 of the reference block for sub prediction unit 1 ofthe current block. In this case, since motion information may be derivedfrom sub prediction unit 1 of the reference block, motion information onsub prediction unit 1 of the reference block is stored in the storagespace. In this case, the stored motion information on sub predictionunit 1 may be defined as motion information 1, and motion information 1may be stored in the storage space instead of motion information 0.Motion information 1 may be used when motion information cannot bederived from some other sub prediction unit of the reference block.

FIG. 15d shows a third step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 15d , an attempt is made to derive motion informationfrom sub prediction unit 2 of the reference block for sub predictionunit 2 of the current block. However, since no motion information can bederived from sub prediction unit 2 of the reference block, motioninformation on sub prediction unit 2 of the current block is derivedfrom the motion information stored in the storage space. In this case,the motion information stored in the storage space may be motioninformation 1.

FIG. 15e shows a fourth step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 15e , motion information is derived from subprediction unit 3 of the reference block for sub prediction unit 3 ofthe current block. In this case, since motion information may be derivedfrom sub prediction unit 3 of the reference block, motion information onsub prediction unit 3 of the reference block is stored in the storagespace. In this case, the stored motion information on sub predictionunit 3 may be defined as motion information 3, and motion information 3may be stored in the storage space instead of motion information 1.Motion information 3 may be used when motion information cannot bederived from some other sub prediction unit of the reference block.

FIGS. 16a to 16g are views schematically illustrating another exemplaryprocess of deriving motion information using motion information storedin a storage space.

FIGS. 16a to 16g illustrate an exemplary process of deriving motioninformation in the case where a sub prediction unit of the referenceblock comes from which motion information cannot be derived, followed byanother sub prediction unit of the reference block from which motioninformation can be derived.

FIG. 16a is a view illustrating the initial state of sub predictionunits of a current block and a storage space.

Referring to FIG. 16a , Ref denotes a reference block, and Ref 0, 1, 2,and 3 respectively denote sub prediction units in the reference block.That is, Ref 0 means sub prediction unit 0 of the reference block, Ref 1sub prediction unit 1 of the reference block, Ref 2 sub prediction unit2 of the reference block, and Ref 3 sub prediction unit 3 of thereference block. Cur denotes the current block, and Cur 0, 1, 2, and 3respectively denote sub prediction units in the current block. That is,Cur 0 means sub prediction unit 0 of the current block, Cur 1 subprediction unit 1 of the current block, Cur 2 sub prediction unit 2 ofthe current block, and Cur 3 sub prediction unit 3 of the current block.In this case, ‘X’ marked in Ref 0 of FIG. 16a denotes motion informationbeing impossible to derive using sub prediction unit 0 of the referenceblock and sub prediction unit 1 of the reference block.

FIG. 16b shows a first step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 16b , an attempt is made to derive motion informationfrom sub prediction unit 0 of the reference block for sub predictionunit 0 of the current block. However, as described above, no motioninformation can be derived from sub prediction unit 0 of the referenceblock, nor is there motion information stored in the storage space.Accordingly, a second step is performed.

FIG. 16c shows a second step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 16c , an attempt is made to derive motion informationfrom sub prediction unit 1 of the reference block for sub predictionunit 1 of the current block. However, as described above, no motioninformation can be derived from sub prediction unit 1 of the referenceblock, nor is there motion information stored in the storage space.Accordingly, a third step is performed.

FIG. 16d shows a third step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 16d , motion information is derived from subprediction unit 2 of the reference block for sub prediction unit 2 ofthe current block. In this case, since motion information may be derivedfrom sub prediction unit 2 of the reference block, motion information onsub prediction unit 2 of the reference block is stored in the storagespace. In this case, the motion information stored in the storage spacemay be defined as motion information 2, which is used when motioninformation cannot be derived from some other sub prediction units ofthe reference block.

FIG. 16e shows a fourth step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 16e , motion information is derived using motioninformation 2 stored in the storage space for sub prediction unit 0 ofthe current block.

FIG. 16f shows a fifth step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 16f , motion information is derived using motioninformation 2 stored in the storage space for sub prediction unit 1 ofthe current block.

FIG. 16g shows a sixth step of deriving motion information from a subprediction unit of the reference block.

Referring to FIG. 16g , motion information is derived from subprediction unit 3 of the reference block for sub prediction unit 3 ofthe current block. In this case, since motion information may be derivedfrom sub prediction unit 3 of the reference block, motion information onsub prediction unit 3 of the reference block is stored in the storagespace. In this case, the stored motion information on sub predictionunit 3 may be defined as motion information 3, and motion information 3may be stored in the storage space instead of motion information 2.Motion information 3 may be used when motion information cannot bederived from some other sub prediction unit of the reference block.

FIG. 17 is a flowchart illustrating a method of deriving motioninformation on a sub prediction unit of a current block using a subprediction unit of a reference block, according to an embodiment of thepresent invention. Each operation in the process of FIG. 17 may beperformed by an encoder and/or a decoder or an inter prediction modulein the encoder and/or decoder, for example, the intra prediction module720 of FIG. 7 or the inter prediction module 850 of FIG. 8.

A process when a sub prediction unit of a reference block has its motioninformation is first described with reference to FIG. 17. The interprediction module determines whether the sub prediction unit of thereference block has motion information (S1700).

The inter prediction module, if the sub prediction unit of the referenceblock has motion information, inserts the motion information present inthe sub prediction unit of the reference block into a sub predictionunit of a current block which is targeted for deriving motioninformation (S1710).

Thereafter, the inter prediction module determines whether the storagespace stores motion information (S1720). If the storage space storesmotion information, step S1750 is performed. In this case, the storagespace has been described above in detail, so has the motion information.

Unless the storage space stores motion information, the inter predictionmodule determines whether the sub prediction unit of the current block,which is targeted for deriving motion information, is the first subprediction unit of the current block (S1730). If the sub prediction unitof the current block targeted for deriving motion information is thefirst sub prediction unit of the current block, the inter predictionmodule performs step S1750.

In step S1730, unless the sub prediction unit of the current block isthe first sub prediction unit, the inter prediction module inserts themotion information present in the sub prediction unit of the referenceblock into the sub prediction unit(s) of the current block that arepositioned ahead of the first sub prediction unit of the current block.For example, if the sub prediction unit of the current block, which istargeted for deriving motion information, is the third sub predictionunit, the inter prediction module inserts the motion information on thesub prediction unit of the reference block into the first and second subprediction units of the current block.

The inter prediction module stores (and updates the existing informationin the storage space with) the motion information on the sub predictionunit of the reference block in the storage space (S1750). In this case,a specific description of storing and updating motion information hasbeen given above.

The inter prediction module determines whether the sub prediction unitof the reference block which is targeted for deriving motion informationis the last sub prediction unit of the reference block (S1790). If thesub prediction unit of the reference block which is targeted forderiving motion information is the last sub prediction unit of thereference block, the inter prediction module terminates the motioninformation deriving process. Unless the sub prediction unit of thereference block which is targeted for deriving motion information is thelast sub prediction unit of the reference block, the inter predictionmodule goes to a next sub prediction unit of the reference block forprocessing (S1780). Thereafter, the inter prediction module repeatssteps S1700 to S1790.

If no sub prediction unit of the reference block has motion information,the following process proceeds.

The inter prediction module determines whether a sub prediction unit ofthe reference block has motion information (S1700).

If the sub prediction unit of the reference block does not have motioninformation, the inter prediction module determines whether the storagespace retains motion information (S1770). Unless the storage spaceretains motion information, the inter prediction module performs stepS1790.

In case the storage space retains motion information, the interprediction module inserts the motion information stored in the storagespace into the sub prediction unit of the reference block which istargeted for deriving motion information (S1750).

After performing the above steps, the inter prediction module determineswhether the sub prediction unit of the reference block which is targetedfor deriving motion information is the last sub prediction unit of thereference block (S1790). If the sub prediction unit of the referenceblock which is targeted for deriving motion information is the last subprediction unit of the reference block, the inter prediction moduleterminates the motion information deriving process. Unless the subprediction unit of the reference block which is targeted for derivingmotion information is the last sub prediction unit of the referenceblock, the inter prediction module goes to a next sub prediction unit ofthe reference block for processing (S1780). Thereafter, the interprediction module repeats steps S1700 to S1790.

Then, the inter prediction module derives a prediction sample for thecurrent block based on the motion information on the current blockderived by the above steps. The prediction sample may mean theabove-described prediction signal, and the prediction signal may mean adifference between the original signal and the residual signal asdescribed above.

The above-described process of deriving motion information on a subprediction unit of a current block may specifically apply to 3D imagesas shown in Table 1. As described above, the operation shown in Table 1may be performed by an encoder/decoder or an inter prediction module ofthe encoder/decoder.

TABLE 1 This process has the following inputs. - Position (xPb, yPb) ofleft and upper end of current prediction unit - Width (nPbW) and heightof current prediction unit - Reference view index refViewIdx - Disparityvector mvDisp This process has the following outputs. - FlagavailableFlagLXinterView for determining whether temporal inter-viewmotion candidate is available, where LX may be reference picture list L0and L1. As used herein, ‘temporal inter-view’ means that a picture at adifferent view from that of the current picture may be referenced as apicture at other time (i.e., other POC) at the same view as the currentpicture. - Temporal inter-view motion vector candidate mvLXInterView,where LX may be reference picture lists L0 and L1. - Reference indexrefIdxLXInterView designating a reference picture present in referencepicture list RefPicListLX, where LX may be reference picture lists L0and L1. LX may be reference picture lists L0 and L1. The followingapplies to LX. - Flag availableFlagLXInterView is initialized as 0. -Motion vector mvLXInterView is initialized as (0,0). - Reference indexrefIdxLXInterView is initialized as −1. Variables nSbW and nSbH areinitialized as follows.  nSbW=Min(nPbW, SubPbSize)  nSbH=Min(nPbH,SubPbSize) Variable ivRefPic is initialized as a picture having the sameViewIdx as refViewIdx in the current access unit. VariablecurSubBlockIdx is initialized as 0, and variable lastAvailableFlag isinitialized as 0. The following applies to yBlk ranging from 0 to(nPbH/nSbH−1) and xBlk ranging from 0 to (nPbW/nSbW−1).  - VariablecurAvailableFlag is initialized as 0.  - The following applies to Xranging from 0 to 1.   - Flag spPredFlagL1[xBlk][yBlk] is initialized as0.   - Motion vector spMvLX is initialized as (0,0).   - Reference indexspRefIdxLX[xBlk][yBlk] is initialized as −1.  - Reference block position(xRef, yRef) is derived as follows.   xRef=Clip3(0,PicWidthInSamplesL−1),    xPb+xBlk*nSbW+nSbW/2+((mvDisp[0]+2)>>2))  yRef=Clip3(0, PicHeightInSamplesL−1,   yPb+yBlk*nSbH+nSbH/2+((mvDisp[1]+2)>>2))  - Variable ivRefPb refersto luma prediction block at (xRef, yRef) in the inter-view referencepicture indicated by ivRefPic.  - (xIvRefPb, yIvRefPb) refers to theleft and upper position of the reference block indicated by ivRefPb.  -Unless ivRefPb has been encoded in intra mode, the following isperformed on X ranging from 0 to 1.   - When X is 0 or current slice isslice B, the following is performed on Y ranging from X to (1−X).    -refPixListLYIvRef, predFlagLYIvRef[x][y], mvLYIvRef[x][y], andrefIdxLYIvRef[x][y], respectively, are set to RefPicListLY,PredFlagLY[x][y], MvLY[x][y], and RefIdxLY[x][y] in the pictureindicated by ivRefPic.    - If predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1,the following is performed on i ranging from 0 tonum_ref_idx_1X_active_minus1 (the number of reference pictures inreference picture list).    - If POC ofrefPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] is the same asRefPicListLX[i] and spPredFlagLX[xBlk][yBlk] is 0, the followingapplies.     spMvLX[xBlk][yBlk]=mvLYIvRef[xIvRefPb][yIvRefPb]    spRefIdxLX[xBlk][yBlk]=i     spPredLfagLX[xBlk][yBlk]=1    curAvailableFlag=1 The following applies according tocurAvailableFlag.  - If curAvailableFlag is 1, the following orderapplies.   1. If lastAvailableFlag is 0, the following applies.    - Thefollowing applies to X ranging from 0 to 1.    mxLXInterView=spMvLX[xBlk][yBlk]    refIdxLXInterView=spRefIdxLX[xBlk][yBlk]    availableFlagLXInterview=spPredFlag[xBlk][yBlk]    - WhencurSubBlockIdx is larger than 0, the following applies to k ranging from0 to (curSubBlockIdx−1).     - Variables i and j are derived as follows.     i=k%(nPSW/nSbW)      j=k/(nPSW/nSbW)     - The following applies toX ranging from 0 to 1.      spMvLX[i][j]=spMvLX[xBlk][yBlk]     spRefIdxLX[i][j]=spRefIdxLX[xBlk][yBlk]     spPredFlagLX[i][j]=spPredFlagLX[xBlk][yBlk]    2. VariablelastAvailableFlag is replaced with 1.    3. xBlk and yBlk are stored invariables xLastAvail and yLastAvail, respectively.  - IfcurAvailableFlag is 0, and lastAvailableFlag is 1, the following appliesto X ranging from 0 to 1.  spMvLX[xBlk][yBlk]=spMvLX[xLastAvail][yLastAvail]  spRefIdxLX[xBlk][yBlk]=spRefIdxLX[xLastAvail][yLastAvail]  spPredFlagLX[xBlk][yBlk]=   spPredFlagLX[xLastAvail][yLastAvail]  -Variable curSubBlockIdx is set to curSubBlockIdx+1.

Table 1 is now described in detail.

Referring to Table 1, the position of the left and upper end of thecurrent prediction block, the width and height of the current predictionblock, a reference view index, and a disparity vector are input to theinter prediction module. In this case, the position of the left andupper end of the current prediction block may be denoted (xPb, yPb),where ‘xPb’ may refer to the X-axis coordinate of the current predictionblock, and ‘yPb’ the y-axis coordinate of the current prediction block.The width of the current prediction block may be denoted ‘nPbW,’ and theheight of the current prediction block ‘nPbH.’ The reference view indexmay be denoted ‘refViewIdx,’ and the disparity vector ‘mvDisp.’ In thiscase, the inter prediction module may correspond to the above-describedinter prediction module of the image encoder/decoder.

Referring to FIG. 17, after finishing the process of deriving the motioninformation on the sub prediction unit of the current block using thesub prediction unit of the reference block, the inter prediction moduleoutputs a flag for determining whether a temporal inter-view motioncandidate is available, a temporal inter-view motion vector candidate,and a reference picture present in a reference picture list. In thiscase, the flag for determining whether a temporal inter-view motioncandidate is available may be defined as ‘availableFlagLXInterView,’ andthe temporal inter-view motion candidate may be defined as‘mvLXInterView.’ The reference picture list may be denoted‘RefPicListLX,’ and the reference index designating a reference picturepresent in the reference picture list may be defined as‘refIdxLXInterView.’ In ‘availableFlagLXInterView’, ‘mvLXInterView’,‘RefPicListLX”, and ‘refIdxLXInterView,’ ‘LX’ may be reference picturelist 0(List 0, L0) or reference picture list 1(List 1, L1).

Now described is a method of deriving motion information on a subprediction unit of a current block using a sub prediction unit of areference block in order for an inter prediction module to derive theabove-described outputs from the above-described inputs.

The inter prediction module performs initialization before derivingmotion information on a sub prediction unit of a current block using asub prediction unit of a reference block. In this case,availableFlagLXInterView is set to 0, mvLXInterView (0,0), andrefIdxLXInterView −1. When the inter prediction module performsinitialization, the width and height of the sub prediction unit areinitialized also. In this case, the width of the sub prediction unit maybe denoted ‘nSbW,’ and the height of the sub prediction unit ‘nSbH.’ Aspecific method of initializing variables nSbW and nSbH is given asEquation 1 below.

nSbW=Min(nPbW,SubPbSize[nuh_layer_id])

nSbH=Min(nPbH,SubPbSize[nuh_layer_id])  [Equation 1]

In this case, SubPbSize denotes the size (including the height andwidth) of the sub prediction unit designated by an image parameter set(VPS), and nuh_layer_id denotes an index for identifying a layer (e.g.,which reference view it is). Min( ) may be defined as in Equation 2 tooutput the smaller of input variables.

$\begin{matrix}{{{Min}\left( {x,y} \right)} = \left\{ \begin{matrix}{x;{x \leqq y}} \\{y;{x > y}}\end{matrix} \right.} & \left\lbrack {{Equation}\mspace{14mu} 2} \right\rbrack\end{matrix}$

The inter prediction module may initialize not only the above-describedvariables but also information for identifying a sub prediction unit ofthe current block and the luma prediction block at (xRef, yRef) in theinter-view reference picture and information for identifying whether themotion information stored in the storage space is available.

In this case, the luma prediction block at (xRef, yRef) in theinter-view reference picture is set as a block in a picture having thesame view index as the reference view index in the current access unit.In this case, the luma prediction block at (xRef, yRef) in theinter-view reference picture is defined as ‘ivRefPic,’ and the accessunit means a unit in which an image is encoded/decoded. The access unitincludes images with different views, which have the same picture ordercount (POC). For example, if there are three views, one access unit mayinclude a common image and/or depth information image of the first view,a common image and/or depth information image of the second view, and acommon image and/or depth information image of the third view. Thereference view index may be defined as ‘refViewIdx,’ and the view index‘ViewIdx.’ In this case, ViewIdx may mean a view of the current picture.

In this case, the information for identifying a sub prediction unit ofthe current block for initialization may be set to 0, and theinformation for identifying the sub prediction unit of the current blockmay be defined as ‘curSubBlockIdx.’ The information for identifyingwhether the motion information stored in the storage space is availableis also set and initialized to 0, and the information for identifyingwhether the motion information stored in the storage space may bedefined as ‘lastAvalableFlag.’

After initializing the above-described variables, the inter predictionmodule performs the following process on yBlk that ranges from 0 to(nPbH/nSbH-1) and xBlk that ranges from 0 to (nPbW/nSbW-1). Here, xBlkmeans the x coordinate of the block, and yBlk means the y coordinate ofthe block.

First, the inter prediction module initializes the information foridentifying whether to predict motion information from a sub predictionunit of the reference block, the sub prediction unit prediction flag,motion information on the sub prediction unit, and reference index ofthe sub prediction unit. Specifically, the information for identifyingwhether to predict the motion information from the sub prediction unitof the reference block may be set to 0. In this case, the informationfor identifying whether to predict motion information from the subprediction unit of the reference block may be defined as‘curAvailableFlag.’ The sub prediction unit prediction flag may be setto 0, and the sub prediction unit prediction flag may be defined as‘spPredFlagL1.’ To represent coordinates of the block, the subprediction unit flag may be defined as ‘spPredFlagL1 [xBlk][yBlk].’ Themotion vector of the sub prediction unit is set to (0, 0), and themotion vector of the sub prediction unit may be defined as ‘spMvLX.’ Thereference index of the sub prediction unit may be set to −1, and thereference index of the sub prediction unit may be defined as‘spRefIdxLX.’ To represent coordinates of the block, the reference indexof the sub prediction unit may be defined as ‘spRefIdxLX[xBlk][yBlk].’

The position (xRef, yRef) of the reference block may be set as in thefollowing Equation 3.

xRef=Clip3(0,PicWidthInSamplesL−1,xPb+xBlk*nSbW+nSbW/2+((mvDisp[0]+2)>>2)))

yRef=Clip3(0,PicHeightInSamplesL−1,yPb+yBlk*nSbH+nSbH/2+((mvDisp[0]+2)>>2)))  [Equation3]

Here, xRef means the x coordinate of the position of the referenceblock, and yRef means the y coordinate of the position of the referenceblock. PicWidthInSamplesL means the width at the current picture, andPicHeightInSamplesL means the height at the current picture. Clip3( )may be defined as in the following Equation 4.

$\begin{matrix}{{{Clip}\; 3\left( {x,y,z} \right)} = \left\{ \begin{matrix}{x;{z < x}} \\{y;{x > y}} \\{z;{otherwise}}\end{matrix} \right.} & \left\lbrack {{Equation}\mspace{14mu} 4} \right\rbrack\end{matrix}$

In case the inter-view reference block is encoded in intra mode, thefollowing process is performed on X that ranges from 0 to 1. Theinter-view reference block refers to a luma prediction block at (xRef,yRef) in the inter-view reference picture indicated by ivRefPic, and theinter-view reference block may be defined as ‘ivRefPb.’ That is, ivRefPbdenotes the luma prediction block at (xRef, yRef) in the inter-viewreference picture indicated by ivRefPic, and ivRefPic denotes theinter-view reference picture. The position of the left and upper end ofthe reference block indicated by ivRefPb may be set to (xIvRefPb,yIvRefPb).

When X is 0 or the current slice is slice B, each variable is reset forY (Y ranges from X to (1-X)) as follows. refPicListLYIvRef is set toRefPicListLY in the picture indicated by ivRefPic, where RefPicListLYmeans a reference picture list. predFlagLYIvRef[x][y] is set toPredFlagLY[x][y] in the picture indicated by ivRefPic, where PredFlagLYmeans an identifier indicating a reference picture list. mvLYIvRef[x][y]is set to MvLY[x][y] in the picture indicated by ivRefPic, where MvLYmeans a motion vector. Likewise, refIdxLYIvRef[x][y] is set toRefIdxLY[x][y] in the picture indicated by ivRefPic, where RefIdxLYmeans a reference index.

In this case, if predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1, the followingEquation 5 may apply to i ranging from 0 tonum_ref_idx_1X_active_minus1(the number of reference pictures in thereference picture list).

spMvLX[xBlk][yBlk]=mvLYIvRef[xIvRefPb][yIvRefPb]

spRefIdxLX[xBlk][yBlk]=i

spPredFlagLX[xBlk][yBlk]=1

curAvailableFlag=1[Equation 5]

Meanwhile, referring to Table 1, the following processes respectivelyapply to the case where curAvailableFlag is 1 and the case wherecurAvailableFalg is 0.

If curAvailableFlag is 1, the inter prediction module performs thefollowing process.

1. If lastAvailableFlag is 0, the following Equation 6 may apply to Xranging from 0 to 1.

mxLXInterView=spMvLX[xBlk][yBlk]

refIdxLXInterView=spRefIdxLX[xBlk][yBlk]

availableFlaqLXInterview=spPredFlag[xBlk][yBlk]  [Equation 6]

If lastAvailableFlag is 0, and curSubBlockIdx is larger than 0, thefollowing Equation 7 may apply to variables i and j for k ranging from 0to (curSubBlockIdx−1).

i=k %(nPSW/nSbW)

i=k/(nPSW/nSbW)  [Equation 7]

In this case, the following Equation 8 applies to X ranging from 0 to I.

spMvLX[i][j]=spMvLX[xBlk][yBlk]

spRefIdxLX[i][j]=spRefIdxLX[xBlk][yBlk]

spPredFlagLX[i][j]=spPredFlagLX[xBlk][yBlk]

2. After the above-described process, the inter prediction modulereplaces lastAvailableFlag with 1.

3. Thereafter, the inter prediction module stores xBlk and yBlk invariables xLastAvail and yLastAvail, respectively.

If curAvailableFlag is 1, and lastAvailableFlag is 1. the interprediction module applies the following Equation 9 to X ranging from 0to 1.

spMvLX[xBlk][yBlk]=spMvLX[xLastAvail][yLastAvail]

spRefIdxLX[xBlk][yBlk]=spRefIdxLX[xLastAvail][yLastAvail]

spPredFlagLX[xBlk][yBlk]=spPredFlagLX[xLastAvail][yLastAvail]  [Equation9]

After performing all of the above-described processes, variablecurSubBlockIdx is set to curSubBlockIdx+1.

The method of deriving motion information on a sub prediction unit of acurrent block described above in connection with FIG. 17, when unable toderive motion information from a sub prediction unit of a referenceblock, uses the motion information on a sub prediction unit of thereference block, which has been referenced before (or afterwards). Assuch, the method of deriving motion information according to FIG. 17should necessarily reference a sub prediction unit of other referenceblock and thus this method is dependent. A dependent motion informationderiving method is vulnerable to parallel designs, which is described indetail with reference to FIG. 18.

FIG. 18 is a view illustrating an exemplary process of deriving inparallel information on a sub prediction unit of a current block using asub prediction unit of a reference block.

Referring to FIG. 18, Ref means a reference block, and Refs 0, 1, 2, 3,4, 5, 6, and 7 are sub prediction units 0, 1, 2, 3, 4, 5, 6, and 7,respectively, of the reference block. Cur means a current block, andCurs 0, 1, 2, 3, 4, 5, 6, and 7 mean sub prediction units 0, 1, 2, 3, 4,5, 6, and 7, respectively, of the current block. X marked in Refs 2, 3,4, and 5 mean that sub prediction units 2, 3, 4, and 5 of the referenceblock are unavailable upon deriving motion information.

In an embodiment according to FIG. 18, the inter prediction moduledetects a sub prediction unit from which motion information may bederived as described above, in order to derive motion information from asub prediction unit from which motion information cannot be derived.Accordingly, the inter prediction module cannot independently derivemotion information for each sub prediction unit of the current block,and the above-described motion information deriving process is difficultto perform in parallel.

FIG. 19 is a view illustrating an exemplary process of discovering anavailable sub prediction unit when the available sub prediction unit ispositioned at the rightmost and lowermost end of a reference block.

Referring to FIG. 19, each square means a sub prediction unit, where thebold solid lined one means an available sub prediction unit uponderiving motion information while the thinner sold lined ones meanunavailable sub prediction units upon deriving motion information. Thedash-line arrow indicates an order of discovering motion information.

In case a sub prediction unit from which motion information may bederived is positioned only at the rightmost and lowermost end of thereference block as shown in FIG. 19, the sub prediction units should besequentially subject to discovery of a sub prediction unit from whichmotion information may be derived along the dash-line arrow from theleftmost and uppermost end of the reference block. In a typical case, itis not known which sub prediction unit in what reference block may beput to use for deriving motion information. Accordingly, the subprediction units of the reference block are subject to sequentialdiscovery from the first sub prediction unit of the reference block todetermine a sub prediction unit that may be used for deriving motioninformation.

However, the approach of deriving motion information as shown in FIG. 19requires all of the sub prediction units in the reference block todiscover an available sub prediction unit, thus causing frequent accessto the memory. In this case, if only a few among the sub predictionunits of the reference block have motion information, unnecessary subprediction unit discovery occurs. In particular, if none of the subprediction units in the reference block are used to derive motioninformation, the process of discovering available sub prediction unitsof the reference block only brings about unnecessary memory accesswithout any benefit. In this case, “having no motion information” meansthat the current block failed to discover a similar region in thereference block of a neighboring frame.

Accordingly, in case only a few or none of the sub prediction units in areference block have motion information, encoding/decoding the currentblock using inter prediction may lead to more efficiency. In otherwords, in such case that only a few or none of the sub prediction unitsin a reference block have motion information, it may be more efficientto discover a similar region in a neighboring pixel of the current blockto perform encoding/decoding on the current block.

FIG. 20 is a view schematically illustrating times required to derivemotion information on a per-sub prediction unit basis.

Referring to FIG. 20, when the time taken to derive motion informationfrom one sub prediction unit is T, and the number of sub predictionunits in a reference block is N, the time taken to derive all the motioninformation from the reference block is NxT. The above-mentioned motioninformation deriving method brings about data dependency and frequentmemory access. Data-dependent motion information deriving methods cannotindependently derive motion information from each sub prediction unit,and in order to derive motion information from one sub prediction unit,it should thus wait until motion information is derived from other subprediction unit. Therefore, the data-dependent motion informationderiving methods may cause an encoding/decoding delay.

Resultantly, the above-described motion information deriving methodcannot achieve data parallelization for simultaneously deriving motioninformation, and from its design architecture, the method may causefrequent memory access which deteriorates memory use efficiency.

An apparatus and method for removing dependency when deriving motioninformation is proposed herein to address the above issues. FIG. 21illustrates an exemplary configuration of an inter prediction module towhich the present invention applies. A method of deriving motioninformation is described in detail with reference to FIGS. 22 to 26,according to an embodiment of the present invention.

FIG. 21 is a block diagram illustrating a configuration of an interprediction module 2100 to which the present invention applies.

Referring to FIG. 21, the inter prediction module 2100 may include astorage module 2110 and a deriving module 2120. The inter predictionmodule 2100 may mean the above-described inter prediction module 710 inthe 3D image encoder or the inter prediction module 850 in the 3D imagedecoder. The inter prediction module 2100 of FIG. 21 may apply to theabove-described image encoding/decoding process.

The storage module 2110 designates a motion information and stores thesame in a storage space. The storage module 2110 may use motioninformation present at a position of the reference block in order toobtain the motion information stored. Here, the position may be thecenter of the reference block or a (sub) prediction unit covering thecenter of the reference block. The motion information stored in thestorage module 2110 may be set to an initial value. Unless the motioninformation can be stored in the storage space, the process of derivingmotion information on a per-sub prediction unit basis may be omitted.When omitting the process of deriving motion information on a per-subprediction unit basis, inter prediction may be carried out as describedsupra. The storage module 2110 is described below in greater detail.

The deriving module 2120 performs a process of deriving motioninformation from a sub prediction unit of the current block. In thiscase, the deriving module 2120 may basically perform the above-describedmotion information deriving process. However, the deriving module 2120proposed herein, unless the sub prediction unit of the reference blockcorresponding to the first sub prediction unit of the current block hasmotion information, may perform discovery to the sub prediction unit ofthe reference block having motion information, and instead of derivingmotion information on the first sub prediction unit of the current blockfrom the sub prediction unit of the reference block having motioninformation, may then derive motion information on the first subprediction unit of the current block from the motion information storedin the storage module. The deriving module 2120 is described below ingreater detail.

Embodiments of the present invention are now described in detail withreference to the drawings.

Embodiment 1

FIG. 22 is a flowchart schematically illustrating a method of derivingmotion information on a sub prediction unit of a current block using areference block, according to an embodiment of the present invention.

In embodiment 1, motion information on a sub prediction unit of acurrent block (current sub unit) is derived based on motion informationfor the center position of a reference block. Embodiment 1 may beperformed in an encoder and decoder or a predicting unit or interprediction module of the encoder and decoder. For ease of descriptionherein, the inter prediction module 2100 of FIG. 21 performs theoperation of embodiment 1.

Referring to FIG. 22, the inter prediction module 2100 may derive thecenter position of the reference block (S2200). The center position ofthe reference block may be derived from Equation 10 below. Here, thereference block may be a block present at the same position as thecurrent block in the reference picture, and the reference block may havethe same size as the current block.

X position=xPb+(nPbW>>1)

Y position=yPb+(nPbH>>1)  [Equation 10]

Here, xPb and yPb refer to a left and upper position of the current PU,nPbW the width of the current PU, and nPbH the height of the current PU.

The inter prediction module 2100 may determine whether there is motioninformation at the center position of the reference block (S2210). Thecenter position of the reference block may be specified as describedabove.

Unless there is motion information available at the center position ofthe reference block, the inter prediction module 2100 may terminate theprocess of deriving motion information. For example, without availablemotion information at the center of the reference block, the interprediction module 2100 might not derive motion information on thecurrent block.

If motion information is present at the center position of the referenceblock, the inter prediction module 2100 may store the motion informationpresent at the center position of the reference block in the storagespace (S2220). The motion information present at the center position ofthe reference block may be motion information on the prediction blockincluding a full sample position most adjacent to the center of thereference block. A specific process of storing motion information by theinter prediction module 2100 has been described above. The interprediction module 2100 may derive motion information on a current subprediction unit based on the stored motion information on the referenceblock.

The inter prediction module 2100 may determine whether the subprediction unit of the reference block corresponding to the current subprediction unit has motion information (S2240).

In case the sub prediction unit of the reference block has motioninformation, the inter prediction module 2100 may insert into thecurrent sub prediction unit the motion information on the sub predictionunit of the reference block (S2250). In other words, the interprediction module 2100 may set the motion information on the subprediction unit of the reference block (for example, motion vector,reference picture index) as the motion information on the correspondingcurrent sub prediction unit.

Unless the sub prediction unit of the reference block has availablemotion information, the inter prediction module 2100 inserts into thecurrent sub prediction unit the motion information of the referenceblock stored in the storage space (S2260). In other words, in case themotion information on the sub prediction unit of the reference blockcorresponding to the current sub prediction unit is unavailable, theinter prediction module 2100 may set the motion information on thecenter of the reference block stored in step S2200 as the motioninformation on the current sub prediction unit.

The inter prediction module 2100 may determine whether the subprediction unit of the reference block corresponding to the current subprediction unit is the last sub prediction unit in the reference block(or in the same meaning whether the current sub prediction unit is thelast sub prediction unit in the current block) (S2270). The interprediction module 2100 may terminate the process of deriving motioninformation in case the sub prediction unit of the reference block isthe last sub prediction unit.

Unless the sub prediction unit of the reference block is the last subprediction unit, the inter prediction module 2100 goes on with drivingmotion information on a next sub prediction unit of the current block inorder to continue to derive motion information (S2230).

The above-described motion information deriving process according toembodiment 1 may apply to 3D image decoding as in Table 2.

TABLE 2 This process has the following inputs. - Position (xPb, yPb) ofleft and upper end of current prediction unit - Width (nPbW) and heightof current prediction unit - Reference view index refViewIdx - Disparityvector mvDisp This process has the following outputs. - FlagavailableFlagLXinterView for determining whether temporal inter-viewmotion candidate is available, where LX may be reference picture list L0and L1. - Temporal inter-view motion vector candidate mvLXInterView,where LX may be reference picture lists L0 and L1. - Reference indexrefIdxLXInterView designating a reference picture present in referencepicture list RefPicListLX, where LX may be reference picture lists L0and L1. LX may be reference picture lists L0 and L1. The followingapplies to LX. - Flag availableFlagLXInterView is initialized as 0. -Motion vector mvLXInterView is initialized as (0,0). - Reference indexrefIdxLXInterView is initialized as −1. Variables nSbW and nSbH areinitialized as follows. Variables nSbW and nSbH are initialized asfollows. nSbW=Min(nPbW, SubPbSize) nSbH=Min(nPbH, SubPbSize) where,SubPbSize is the size including height and width of the sub predictionunit designated by VPS. Variable ivRefPic is initialized as a picturehaving the same ViewIdx as refViewIdx in the current access unit.Variable curSubBlockIdx is initialized as 0. Reference position (xRef,yRef) may be derived as follows.  xRefFull = xPb + ( nPbW >> 1 ) + ( (mvDisp[ 0 ] + 2 ) >> 2 )  yRefFull = yPb + ( nPbH >> 1 ) + ( ( mvDisp[ 1] + 2 ) >> 2 )  xRef = Clip3( 0, PicWidthInSamplesL − 1. ( xRefFull >> 3) << 3 )  yRef = Clip3( 0, PicHeightSamplesL − 1. ( yRefFull >> 3 ) << 3) ivRefPic is set to the picture having the same ViewIdx as refViewIdxin the current access unit. The motion information in the referencepicture may be stored in units of 8×8 pixel blocks. Correction factorsxRefFull and yRefFull may be the position of the center full sample ofthe reference block specified using mvDisp. ivRefPb may be a predictionblock covering position (xRef, yRef) in ivRefPic. (xIvRefPb, yIvRefPb)specifies the left and upper position of ivRefPb. Unless ivRefPb hasbeen encoded in intra mode, the following may apply to Y ranging from Xto (1−X).  - refPixListLYIvRef, predFlagLYIvRef[x][y], mvLYIvRef[x][y],and refIdxLYIvRef[x][y], respectively, are set to their respectivecorresponding variables, i.e., RefPicListLY, PredFlagLY[x][y],MvLY[x][y], and RefIdxLY[x][y] in the inter-view reference pictureivRefPic.  - If predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1, the followingmay apply to i ranging from 0 to num_ref_idx_1X_active_minus1 (thenumber of reference pictures in reference picture list).  - If POC(Picture Order Count) ofrefPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] is the same asRefPicListLX[i] and availableFlagLXInterView is 0, the followingapplies.   availableFlagLXInterView = 1   mvLXInterView = mvLYIvRef[xIvRefPb ][ yIvRefPb ]   refIdxLX = i If availableFlagL0InterView oravailableFlagL1Interview is 1, the following is performed. - Thefollowing applies to yBlk ranging from 0 to (nPbH/nSbH−1) and xBlkranging from 0 to (nPbW/nSbW−1). - Variable curAvailableFlag isinitialized as 0. - The following applies to X ranging from 0 to 1. -Flag spPredFlagL1[xBlk][yBlk] is initialized as 0. - Motion vectorspMvLX is initialized as (0,0). - Reference index spRefIdxLX[xBlk][yBlk]is initialized as −1. - Reference block position (xRef, yRef) is derivedas follows. xRef=Clip 3(0, PicWidthInSamplesL−1),xPb+xBlk*nSbW+nSbW/2+((mvDisp[0]+2)>>2)) yRef=Clip3(0,PicHeightInSamplesL−1), yPb+yBlk*nSbH+nSbH/2+((mvDisp[1]+2)>>2)) -Variable ivRefPb refers to luma prediction block at (xRef, yRef) in theinter-view reference picture indicated by ivRefPic. - (xIvRefPb,yIvRefPb) refers to the left and upper position of the reference blockindicated by ivRefPb. - Unless ivRefPb has been encoded in intra mode,the following is performed on X ranging from 0 to 1. - When X is 0 orcurrent slice is slice B, the following is performed on Y ranging from Xto (1−X). - refPixListLYIvRef, predFlagLYIvRef[x][y], mvLYIvRef[x][y],and refIdxLYIvRef[x][y], respectively, are set to RefPicListLY,PredFlagLY[x][y], MvLY[x][y], and RefIdxLY[x][y] in the pictureindicated by ivRefPic. - If predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1,the following is performed on i ranging from 0 tonum_ref_idx_1X_active_minus1 (the number of reference pictures inreference picture list). - If POC ofrefPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] is the same asRefPicListLX[i] and spPredFlagLX[xBlk][yBlk] is 0, the followingapplies. spMvLX[xBlk][yBlk]=mvLYIvRef[xIvRefPb][yIvRefPb]spRefIdxLX[xBlk][yBlk]=i spPredLfagLX[xBlk][yBlk]=1 curAvailableFlag=1 -The following applies according to curAvailableFlag. - IfcurAvailableFlag is 0, the following applies to X ranging from 0 to 1. spMvLX[ xBlk ][ yBlk ] = mvLXInterView  spRefIdxLX[ xBlk ][ yBlk ] =refIdxLX  spPredFlagLX[ xBLk ][ yBlk ] = availableFlagLXInterView -Variable curSubBlockIdx is set to curSubBlockIdx+1. IfavailableFlagL0InterView and availableFlagL1InterView are 0, the processis terminated.

Embodiment 1 is described again based on Table 2.

Referring to Table 2, the position of the left and upper end of thecurrent prediction block, the width and height of the current predictionblock, a reference view index, and a disparity vector are input to theinter prediction module 2100. Here, the position of the left and upperend of the current prediction block may be defined as (xPb, yPb). Thewidth of the current prediction block may be defined as ‘nPbW,’ and theheight of the current prediction block ‘nPbH.’ The reference view indexmay be defined as ‘refViewIdx,’ and the disparity vector ‘mvDisp.’

After finishing the process of deriving motion information on the subprediction unit of the current block using the sub prediction unit ofthe reference block, the inter prediction module 2100 may output a flagfor determining whether inter-view prediction is possible, an inter-viewmotion vector, and a reference index designating a reference picturepresent in a reference picture list. In this case, the flag fordetermining whether a temporal inter-view motion candidate is availablemay be defined as ‘availableFlagLXInterView,’ and the temporalinter-view motion candidate may be defined as ‘mvLXInterView.’ Thereference picture list may be denoted ‘RefPicListLX,’ and the referenceindex designating a reference picture present in the reference picturelist may be defined as ‘refIdxLXInterView.’ In‘availableFlagLXInterView’, ‘mvLXInterView’, ‘RefPicListLX”, and‘refIdxLXInterView,’ ‘LX’ may be reference picture list 0(List 0, L0) orreference picture list 1(List 1, L1).

Now described is a method of deriving motion information on a subprediction unit of a current block by obtaining the above-describedoutputs from the inputs.

First, the inter prediction module 2100 performs initialization beforederiving motion information on a sub prediction unit of a current blockusing a sub prediction unit of a reference block. In this case,availableFlagLXInterView may be set to 0, mvLXInterView (0,0), andrefIdxLXInterView −1. When the inter prediction module 2100 performsinitialization, the width and height of the sub prediction unit may beinitialized also. In this case, the width of the sub prediction unit maybe denoted ‘nSbW,’ and the height of the sub prediction unit ‘nSbH.’Equation 11 represents an example of a method for initializing variablesnSbW and nSbH.

nSbW=Min(nPbW,SubPbSize[nuh_layer_id])

nSbH=Min(nPbH,SubPbSize[nuh_layer_id])  [Equation 1]

In this case, SubPbSize denotes the size (including the height andwidth) of the sub prediction unit designated by a VPS, and nuh_layer_iddenotes an index for identifying a layer (e.g., which reference view itis). Min( ) is an operator outputting the smaller of variables input.

The inter prediction module 2100 may initialize not only theabove-described variables but also information for identifying a subprediction unit of the current block and the luma prediction block at(xRef, yRef) in the inter-view reference picture and information foridentifying whether the motion information stored in the storage spaceis available.

In this case, the inter-view reference picture may be set to a picturehaving a view index such as a reference view index in the current accessunit. Here, the inter-view reference picture may be denoted ‘ivRefPic,’and the luma prediction block at (xRef, yRef) in the inter-viewreference picture may be denoted ‘ivRefPb.’ One access unit includesimages with different views, which have the same picture order count(POC). The reference view index may be defined as ‘refViewIdx,’ and theview index ‘ViewIdx.’

The reference position may be a position specifying a prediction blockcovering the center of the reference block according to embodiment 1.The motion information on the reference position may be stored in orderto derive motion information on the current sub prediction unit.Equation 12 shows an exemplary method of deriving the reference position(xRef, yRef).

xRefFull=xPb+(nPbW>>1)+((mvDisp[0]+2)>>2)

yRefFull=yPb+(nPbH>>1)+((mvDisp[1]+2)>>2)

xRef=Clip3(0,PicWidthInSamplesL−1,(xRefFull>>3)<<3)

yRef=Clip3(0,PicHeightInSamplesL−1,(yRefFull>>3)<<3)  [Equation 12]

Here, XRefFull and yRefFull denote the position of the full sample closeto the center of the reference block. That is, xRefFull and yRefFullrespectively denote the x coordinate and the y coordinate of the sampleat an integer position.

ivRefPb may be a sub prediction unit or prediction block covering (xRef,yRef). The position (xIvRefPb, yIvRefPb) of the luma sample may specifythe left and upper end of ivRefPb.

Unless ivRefPb has been encoded/decoded in intra mode, the followingprocesses (1) and (2) may apply to Y ranging from X to (1-X).

refPicListLYIvRef is set to RefPicListLY in the inter-view referencepicture ivRefPic, predFlagLYIvRef[x][y] to PredFlag[x][y] in theinter-view reference picture ivRefPic, and refIdxLYIvRef[x][y] toRefIdxLY[x][y] in the inter-view reference picture ivRefPic.

if predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1, the following processapplies to i ranging from 0 to num_ref_idx_lX_active_minus1(the numberof reference pictures in the reference picture list X). If POC (PictureOrder Count: of refPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] isRefPicListLX[i], and availableFlagLXInterView is 0, Equation 13 mayapply.

availableFlagLXInterView=1

mvLXInterView=mvLYIvRef[xIvRefPb][yIvRefPb]

refIdxLX=i[Equation 13]

In case availableFlagL0InterView or availableFlagL1InterView is 1, theinter prediction module 2100 performs the following process on yBlk thatranges from 0 to (nPbH/nSbH−1) and xBlk that ranges from 0 to(nPbW/nSbW−1). Here, xBlk means the x coordinate, and yBlk means the ycoordinate. In other words, if motion information available at thecenter of the reference block is derived, the inter prediction module2100 may derive motion information on a per-sub prediction unit basis.

First, the inter prediction 2100 unit may initialize the information foridentifying whether to predict motion information from a sub predictionunit of the reference block, the sub prediction unit prediction flag,motion information on the sub prediction unit, and reference index ofthe sub prediction unit.

In this case, the information for identifying whether to predict motioninformation from a sub prediction unit of the reference block may bedefined as ‘curAvailableFlag.’ the sub prediction unit prediction Hag‘spPredFlagLX1,’ the sub prediction unit flag‘spPredFlagLX[xBlk][yBlk],’ the motion vector of the sub prediction unit‘spMvLX,’ the reference index of the sub prediction unit ‘spRefIdxLX.’and the reference index of the sub prediction unit‘spRefIdxLX[xBlk][yBlk].’

The position (xRef. yRef) of the reference block is reset on a per-subprediction unit basis as in the following Equation 14.

xRef=Clip3(0,PicWidthInSamplesL−1,xPb+xBlk*nSbW+nSbW/2+((mvDisp[0]+2)>>2)))

yRef=Clip3(0,PicHeightInSamplesL−1,yPb+yBlk*nSbH+nSbH/2+((mvDisp[0]+2)>>2)))  [Equation14]

PicWidthInSamplesL means the width of the current picture, andPicHeightInSamplesL means the height of the current picture. Further.Clip3( ) has been described above.

Thereafter, in case the inter-view reference block is encoded in intramode, the following process is performed on X that ranges from 0 to I.

When X is 0 or the current slice is slice B, each variable is reset forY (Y ranges front X to (1−X)) as follows. refPicListLYIvRef may be setto reference picture list RefPicListLY for a picture specified byivRefPic (i.e., the inter-view reference picture). predFlagLYIvRef[x][y]is set to PredFlagLY[x][y]. PredFlagLY[x][y] indicates the referencepicture list that applies at (x,y) in the picture specified by ivRefPic.mvLYIvRef[x][y] is set to MvLY[x][y]. MvLY[x][y] means the motion vectorat (x,y) in the picture specified by ivRefPic. refIdxLYIvRef[x][y] isset to RefIdxLY[x][y]. RefIdxLY[x][y] indicates the reference pixel at(x,y) in the picture indicated by ivRefPic.

In case predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1, the following Equation15 may apply to i ranging from 0 to num_ref_idx_lX_active_minus1(thenumber of reference pictures in the reference picture list) if POC ofrefPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] is RefPicListLX[i]and spPredFlagLX[xBlk][yBlk] is 0.

spMvLX[xBlk][yBlk]=mvLYIvRef[xIvRefPb][yIvRefPb]

spRefIdxLX[xBlk][yBlk]=i

spPredFlagLX[xBlk][yBlk]=1

curAvailableFlag=1[Equation 15]

Even after the above-described process has been performed, ifcurAvailableFlag as set is 0 (i.e.. unless spRefidxLX=i (e.g.,spRefIdxLx=−1). and spPredFlagLX=1 (e.g., spPredFlagLX=−1)), it may besaid that no motion information may be derived on a per-sub predictionunit basis. Accordingly, the inter prediction module 2100 may applyEquation 16 to X ranging from 0 to 1.

In other words, in case motion information cannot be derived from thesub prediction unit of the reference block, the inter prediction module2100 may derive motion information on the sub prediction unit of thecurrent block from the motion information on the center position of thereference block.

spMvLX[xBlk][yBlk]=mvLXInterView

spRefIdxLX[xBlk][yBlk]=refIdxLX

spPredFlagLX[xBlk][yBlk]=availableFlagLXInterView  [Equation 16]

Finally, after all of the above-described processes have been done,variable, curSubBlockIdx, is set to curSubBlockIdx+1, and ifavailableFlagL0InterView and availableFlagL1InterView are 0, the processof deriving motion information according to embodiment 1 is ended.

Embodiment 2

FIG. 23 is a flowchart schematically illustrating a method of derivingmotion information on a sub prediction unit of a current block,according to another embodiment of the present invention. In the exampleillustrated in FIG. 23, motion information on a sub prediction unit of acurrent block may be derived using a sub prediction unit present at aposition of a reference block.

In embodiment 2, the motion information on the sub prediction unit ofthe current block may be derived based on the motion information on thesub prediction unit covering the center of the reference block.

The example shown in FIG. 23 may be performed in an encoder and decoderor a predicting unit of the encoder and decoder or the inter predictionmodule 2100 shown in FIG. 21. Here, for ease of description, the interprediction module 2100 performs each step as shown in FIG. 23.

Referring to FIG. 23, the inter prediction module 2100 may derive theposition of the sub prediction unit positioned at the center of thereference block (center sub prediction unit) (S2300). The center subprediction unit positioned in the reference block means a sub predictionunit located at the center of the reference block, and the center of thereference block has been described above. Equation 17 represents anexample of deriving the position of the center sub prediction unit ofthe reference block.

Center sub prediction unit's X value=xPb+(nPbW/nSbW/2)*nSbW+nSbW/2

Center sub prediction unit's Yvalue=yPb+(nPbH/nSbH/2)*nSbH+nSbH/2  [Equation 17]

Here, xPb and yPb refer to a left and upper position of the currentprediction unit, nPbW the width of the current prediction unit, and nPbHthe height of the current prediction unit.

The inter prediction module 2100 determines whether the center subprediction unit of the reference block has motion information (S2310),and the position of the center sub prediction unit of the referenceblock has been described above. If no motion information is present atthe position of the center sub prediction unit of the reference block,the inter prediction module 2100 may terminate the motion informationderiving process.

In case motion information is present in the center sub prediction unitof the reference block, the inter prediction module 2100 may store themotion information present at the center position (S2320). A specificprocess of storing motion information by the inter prediction module2100 has been described above.

The inter prediction module 2100 derives motion information on thecurrent sub prediction unit. The inter prediction module 2100 maydetermine whether the sub prediction unit of the reference blockcorresponding to the current sub prediction unit has motion information(S2340).

In case the sub prediction unit of the reference block has motioninformation, the inter prediction module 2100 may insert into thecurrent sub prediction unit the motion information present in the subprediction unit of the reference block (S2350). Unless the subprediction unit of the reference block has motion information, the interprediction module 2100 may insert the motion information stored in stepS2320 into the current sub prediction unit (S2360).

The inter prediction module 2100 may determine whether the subprediction unit of the reference block which is targeted for derivingmotion information is the last sub prediction unit (S2370). In case thesub prediction unit of the reference block is the last sub predictionunit, the inter prediction module 2100 may terminate the process ofderiving motion information on the current block. Unless the subprediction unit of the reference block is the last sub prediction unit,it goes to a next sub prediction unit of the current block to continueto derive motion information (S2330).

The above-described motion information deriving process according toembodiment 2 may apply to 3D images as in Table 3.

TABLE 3 This process has the following inputs. - Position (xPb, yPb) ofleft and upper end of the current prediction unit - Width (nPbW) andheight (nPbH) of the current prediction unit - Reference view indexRefViewIdx - Disparity vector mvDisp This process has the followingoutputs. - Flag availableFlagLXInterView for determining whethertemporal inter-view candidate is available, where LX may be referencepicture lists L0 and L1. - Temporal inter-view motion vector candidatemvLXInterView, where LX may be reference picture lists L0 and L1. -Reference index refIdxLXInterView designating a reference picturepresent in reference picture list RefPicListLX, where LX may bereference picture lists L0 and L1. LX may be reference picture lists L0and L1. The following applies to LX. - Flag availableFlagLXInterView isinitialized as 0. - Motion vector mvLXInterView is initialized as (0,0). - Reference index refIdxLXInterView is initialized as −1. VariablesnSbW and nSbH are initialized as follows. - nSbW = Min( nPbW, SubPbSize) - nSbH = Min( nPbH, SubPbSize ) where, SubPbSize is the size includingheight and width of the sub prediction unit designated by VPS. VariableivRefPic is initialized as a picture having the same ViewIdx asrefViewIdx in the current access unit. Variable curSubBlockIdx isinitialized as 0. Reference position (xRef, yRef) may be derived asfollows. xRef = Clip3( 0, PicWidthInSamplesL − 1, xPb + (nPbW / nSbW /2) * nSbW + nSbW/2) yRef = Clip3( 0, PicHeightInSamplesL − 1, yPb +(nPbH / nSbH / 2) * nSbH + nSbH/2) ivRefPic is set to the picture havingthe same ViewIdx as refViewIdx in the current access unit. ivRefPb isset to the prediction block covering position (xRef, yRef) in ivRefPic.(xIvRefPb, yIvRefPb) is set to the left and upper position of thereference block indicated by ivRefPb. Unless ivRefPb has been encoded inintra mode, the following may apply to X ranging from 0 to 1 - When X is0 or current slice is slice B, the following applies to Y ranging from Xto (1−X). - refPixListLYIvRef, predFlagLYIvRef[x][y], mvLYIvRef[x][y],and refIdxLYIvRef[x][y], respectively, are set to their respectivecorresponding variables, i.e. RefPicListLY, PredFlagLY[x][y],MvLY[x][y], and RefIdxLY[x][y] in the inter-view reference pictureivRefPic. - If predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1, the followingmay apply to i ranging from 0 to num_ref_idx_1X_active_minus1 (thenumber of reference pictures in reference picture list). - If POC(Picture Order Count) ofrefPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] is the same asRefPicListLX[i] and centerPredFlag is 0, the following applies. centerAvailableFlag = 1  centerMvLX = mvLYIvRef[ xIvRefPb ][ yIvRefPb ] centerRefIdxLX = i  centerPrdeFlagLX = 1 If centerAvailableFlag is 1,the following is performed. - The following applies to yBlk ranging from0 to (nPbH/nSbH−1) and xBlk ranging from 0 to (nPbW/nSbW−1). - VariablecurAvailableFlag is initialized as 0. - The following applies to Xranging from 0 to 1. - Flag spPredFlagL1[xBlk][yBlk] is initialized as0. - Motion vector spMvLX is initialized as (0,0). - Reference indexspRefIdxLX[xBlk][yBlk] is initialized as −1. - Reference block position(xRef, yRef) is derived as follows. xRef=Clip3(0, PicWidthInSamplesL−1), xPb+xBlk*nSbW+nSbW/2+((mvDisp[0]+2)>>2)) yRef=Clip3(0,PicHeightInSamplesL−1), yPb+yBlk*nSbH+nSbH/2+((mvDisp[1]+2)>>2)) -Variable ivRefPb refers to luma prediction block at (xRef, yRef) in theinter-view reference picture indicated by ivRefPic. - (xIvRefPb,yIvRefPb) refers to the left and upper position of the reference blockindicated by ivRefPb. - Unless ivRefPb has been encoded in intra mode,the following is performed on X ranging from 0 to 1. - When X is 0 orcurrent slice is slice B, the following is performed on Y ranging from Xto (1−X). - refPixListLYIvRef, predFlagLYIvRef[x][y] mvLYIvRef[x][y],and refIdxLYIvRef[x][y], respectively, are set to RefPicListLY,PredFlagLY[x][y], MvLY[x][y], and RefIdxLY[x][y] in the pictureindicated by ivRefPic. - If predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1,the following is performed on i ranging from 0 tonum_ref_idx_1X_active_minus1 (the number of reference pictures inreference picture list). - If POC ofrefPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] is the same asRefPicListLX[i] and spPredFlagLX[xBlk][yBlk] is 0, the followingapplies.  spMvLX[ xBlk ][ yBlk ] = mvLYIvRef[ xIvRefPb ][ yIvRefPb ] spRefIdxLX[ xBlk ][ yBlk ] = i  spPredFlagLX[ xBlk ][ yBlk ] = 1 curAvailableFlag = 1 - The following applies according tocurAvailableFlag. - If curAvailableFlag is 0, the following applies to Xranging from 0 to 1.  spMvLX[ xBlk ][ yBlk ] = centerMvLX  spRefIdxLX[xBlk ][ yBlk ] = centerRefIdxLX  spPredFlagLX[ xBlk ][ yBlk ] =centerPredFlagLX - Variable curSubBlockIdx is set to curSubBlockIdx+1.Otherwise, i.e., if centerAvailableFlag is 0, the process is terminated.

Embodiment 2 is described again based on Table 3.

The variables in Table 3 are the same as those in Table 2.

The inter prediction module 2100 performs initialization before derivingmotion information on a current sub prediction unit using a subprediction unit of a reference block. The initialization is the same asthat described above in connection with Table 2.

The inter prediction module may specify the position of the center subprediction unit of the reference block. The position of the referencedblock may be determined based on the reference position, and referenceposition (xRef, yRef) is derived as in Equation 18.

xRef=Clip3(0,PicWidthInSampleL−1,xPb+(nPbW/nSbW/2)*nSbW+nSbW/2)

yRef=Clip3(0,PicHeightInSampleL−1,yPb+(nPbH/nSbH/2)*nSbH+nSbH/2)  [Equation18]

ivRefPic is a picture having the same ViewIdx as refViewIdx in thecurrent access unit, and ivRefPb is a prediction block or sub predictionunit covering (xRef, yRef) derived by Equation 19 in ivRefPic.

(xIvRefPb, yIvRefPb) specifies the left and upper position of ivRefPb.

In case ivRefPb has not been encoded/decoded in intra mode, and X is 0or the current slice is slice B, the following process applies to Yranging from X to (1−X).

As described above in connection with Table 2, refPicListLYIvRef is setto RefPicListLY, predFlagLYIvRef[x][y] to PredFlag[x][y], andrefIdxLYIvRef[x][y] to RefIdxLY[x][y].

If predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1, Equation 19 applies to iranging from 0 to num_ref_idx_lX_active_minus1(the number of referencepictures in the reference picture list X in case POC (Picture OrderCount) of refPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] isRefPicListLX[i], and availableFlagLXInterView is 0.

centerAvailableFlag=1

centerMvLX=mvLYIvRef[xIvRefPb][yIvRefPb]

centerRefIdxLX=i

centerPredFlagLX=1  [Equation 19]

In Equation, centerAvailableFlag denotes whether the center subprediction unit of the reference block is available, and centerMvLXmeans the motion vector for the center sub prediction unit of thereference block. Further, centerRefIdxLX refers to the reference indexfor the center sub prediction unit of the reference block, andcenterPredFlagLX refers to the reference picture list of the center subprediction unit. Here, centerAvailableFlag, centerMvLX, centerRefIdxLX,and/or centerPredFlagLX mean motion information of the center subprediction unit. In other words, the inter prediction module 2100 maystore in the storage space the motion information on the center subprediction unit of the reference block set in Equation 19.

After the variables have been set as described above, in casecenterAvailableFlag is 1, the inter prediction module 2100 performs thefollowing process on yBlk that ranges from 0 to (nPbH/nSbH−1) and xBlkthat ranges from 0 to (nPbW/nSbW−1). Here, xBlk means the x coordinateof the block, and yBlk means the y coordinate of the block. In otherwords, if motion information available from the sub block at the centerof the reference block is derived, the inter prediction module 2100 mayderive motion information on the current block on a per-sub predictionunit basis.

First, the inter prediction module 2100 initializes the information foridentifying whether to predict motion information from a sub predictionunit of the reference block, the sub prediction unit prediction flag,motion information on the sub prediction unit, and reference index ofthe sub prediction unit. The initialization is the same as thatdescribed above in connection with Table 2.

The position (xRef, yRef) of the reference block is reset as shown inEquation 20 on a per-sub prediction unit basis.

xRef=Clip3(0,PicWidthInSamplesL−1,xPb+xBlk*nSbW+nSbW/2+((mvDisp[0]+2)>>2)))

yRef=Clip3(0,PicHeightInSamplesL−1,yPb+yBlk*nSbH+nSbH/2+((mvDisp[0]+2)>>2)))  [Equation20]

Here, xRef means the x coordinate of the position of the referenceblock, and yRef means the y coordinate of the position of the referenceblock. PicWidthInSamplesL means the width of the current picture, andPicHeightInSamplesL means the height of the current picture. Clip3( )has been described above.

In case the inter-view reference block is encoded in intra mode, theinter prediction module 2100 performs the following process on X thatranges from 0 to 1.

When X is 0 or the current slice is slice B, each variable is reset forY (Y ranges from X to (1−X)) as follows. The initialization is the sameas that described above in connection with Table 2.

In case predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1, the following Equation21 may apply to i ranging from 0 to num_ref_idx_lX_active_minus1(thenumber of reference pictures in the reference picture list) if POC ofrefPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] is RefPicListLX[i]and spPredFlagLX[xBlk][yBlk] is 0.

spMvLX[xBlk][yBlk]=mvLYIvRef[xIvRefPb][yIvRefPb]

spRefIdxLX[xBlk][yBlk]=i

spPredFlagLX[xBlk][yBlk]=1

curAvailableFlag=1[Equation 21]

Even after the above-described process has been performed, ifcurAvailableFlag as set is 0 (i.e., unless spRefIdxLX=i (e.g.,spRefIdxLx=−1), and spPredFlagLX=1 (e.g., spPredFlagLX=−1)), it may besaid that no motion information may be derived on a per-sub predictionunit basis. Accordingly, the inter prediction module 2100 may applyEquation 22 to X ranging from 0 to 1.

In other words, in case motion information cannot be derived from thesub prediction unit of the reference block, the inter prediction module2100 may derive motion information on the sub prediction unit of thecurrent block from the motion information on the center sub unit.

spMvLX[xBlk][yBlk]=centerMvLX

spRefIdxLX[xBlk][yBlk]=centerRefIdxLX

spPredFlagLX[xBlk][yBlk]=centerPredFlagLX  [Equation 22]

Finally, after all of the above-described processes have been done,variable, curSubBlockIdx. is set to curSubBlockIdx+1, and ifavailableFlagL0InterView and availableRagL1Interview are 0, die processof deriving motion information according to embodiment 2 is ended.

FIG. 24 is a view illustrating an exemplary process of deriving motioninformation on a sub prediction unit of a current block using motioninformation at a position.

Referring to FIG. 24, the blocks positioned at the upper end of FIG. 24mean sub prediction units of the reference block, and the blockspositioned at the lower end of FIG. 24 mean sub prediction units of thecurrent block. X denotes a position, and motion information at X isstored in a storage space. Here, the motion information at the positionof FIG. 24 may mean motion information at the center position of thereference block as in embodiment 1, and the motion information at theposition of FIG. 24 may mean the motion information on the center subprediction unit of the reference block as in embodiment 2.

Upon deriving the motion information on the sub prediction unit of thecurrent block using the motion information at the position, each subprediction unit in the reference block may utilize the motioninformation at the position. In other words, motion information on theplurality of sub prediction units of the current block may besimultaneously derived using the motion information at the position, andderiving motion information using the motion information at the positionmay address the issue of data dependency. Accordingly, upon use ofmotion information at the position, the inter prediction module 2100 mayderive motion information in parallel.

As described above, embodiments 1 and 2 derive motion information usingmotion information present at any position. Accordingly, the motioninformation deriving methods according to embodiments 1 and 2 enableindependent derivation of motion information on each sub prediction unitin the reference block. In other words, embodiments 1 and 2 do notrequire sequential discovery of sub prediction units from which motioninformation may be derived in order to find sub prediction units fromwhich motion information may be derived, and in case the first subprediction unit of the reference block is impossible to use for derivingmotion information, embodiments 1 and 2 derive motion information on thesub prediction unit of the current block using predetermined motioninformation. As such, the motion information derivation according toembodiments 1 and 2 remove data dependency, enabling parallelizedderivation of motion information on each sub prediction unit. Further,the motion information derivation according to embodiments 1 and 2prevent additional memory access in contrast to existing motioninformation deriving methods, thus reducing the number of times ofaccessing the memory.

Embodiment 3

FIG. 25 is a flowchart illustrating a method of deriving motioninformation on a sub prediction unit of a current block using a motioninformation value according to another embodiment of the presentinvention.

Referring to FIG. 25, embodiment 4 provides a method of setting defaultmotion information and deriving motion information on a current subprediction unit from the default motion information in case motioninformation is impossible to derive from a sub prediction unit of areference block. Here, the default motion information may mean a zerovector. A specific method of deriving motion information according toembodiment 3 is described below.

The inter prediction module 2100 may store the default motioninformation in a storage space (S2500). A specific process of storingmotion information by the inter prediction module 2100 has beendescribed above.

Subsequently, the inter prediction module 2100 may derive motioninformation on the current sub prediction unit. The inter predictionmodule 2100 may determine whether the sub prediction unit of thereference block corresponding to the current sub prediction unit hasmotion information (S2520).

In case the sub prediction unit of the reference block has motioninformation, the inter prediction module 2100 may insert into thecurrent sub prediction unit the motion information on the sub predictionunit of the reference block (S2530). Unless the sub prediction unit ofthe reference block has motion information, the inter prediction module2100 may insert the motion information stored in the storage space intothe current sub prediction unit (S2540).

The inter prediction module 2100 may determine whether the subprediction unit of the reference block which is targeted for derivingmotion information is the last sub prediction unit (S2550). In case thesub prediction unit of the reference block is the last sub predictionunit, the inter prediction module 2100 may terminate the process ofderiving motion information. Unless the sub prediction unit of thereference block is the last sub prediction unit, the inter predictionmodule 2100 may discover motion information on a next sub predictionunit of the reference block in order to continue to derive motioninformation (S2510).

The above-described motion information deriving process according toembodiment 3 may apply to 3D-HEVC Draft Text 2 as in Table 4.

TABLE 4 This process has the following inputs. - Position (xPb, yPb) ofleft and upper end of current prediction unit - Width (nPbW) and heightof current prediction unit - Reference view index refViewIdx - Disparityvector mvDisp This process has the following outputs. - FlagavailableFlagLXinterView for determining whether temporal inter-viewmotion candidate is available, where LX may be reference picture list L0and L1. - Temporal inter-view motion vector candidate mvLXInterView,where LX may be reference picture lists L0 and L1. - Reference indexrefIdxLXInterView designating a reference picture present in referencepicture list RefPicListLX, where LX may be reference picture lists L0and L1. LX may be reference picture lists L0 and L1. The followingapplies to LX. - Flag availableFlagLXInterView is initialized as 0. -Motion vector mvLXInterView is initialized as (0,0). - Reference indexrefIdxLXInterView is initialized as −1. Variables nSbW and nSbH areinitialized as follows. - nSbW=Min(nPbW, SubPbSize) - nSbH=Min(nPbH,SubPbSize) where, SubPbSize is the size including height and width ofthe sub prediction unit designated by VPS. Variable ivRefPic isinitialized as a picture having the same ViewIdx as refViewIdx in thecurrent access unit. Variable curSubBlockIdx is initialized as 0.Variables availableFlagL0InterView and availableFlagL1Interview areinitialized as follows.  availableFlagL0Zero= 1  mvL0Zero = (0, 0) refIdxL0Zero = 0 If current slice is slice B,  availableFlagL1Zero = 1 mvL1Zero = (0, 0)  refIdxL1Zero = 0 The following applies to yBlkranging from 0 to (nPbH/nSbH−1) and xBlk ranging from 0 to(nPbW/nSbW−1). - Variable curAvailabeFlag is initialized as 0. - Thefollowing applies to X ranging from 0 to 1. - FlagspPredFlagL1[xBlk][yBlk] is initialized as 0. - Motion vector spMvLX isinitialized as (0, 0). - Reference index spRefIdxLX[xBlk][yBlk] isinitialized as −1. - Reference block position (xRef, yRef) is derived asfollows.  xRef = Clip3( 0, PicWidthInSamplesL − 1.  xPb + xBlk * nSbW +nSbW / 2 + ( ( mvDisp[ 0 ] + 2) >> 2 ) )  yRef = Clip3( 0,PicHeightInSamplesL − 1.  yPb + yBlk * nSbH + nSbH / 2 + ( ( mvDisp[ 1] + 2) >> 2 ) ) - Variable ivRefPb refers to the luma prediction blockat (xRef, yRef) in the inter-view reference picture indicated byivRefPic. - (xIvRefPb, yIvRefPb) refers to the left and upper positionof the reference block indicated by ivRefPb. - Unless ivRefPb has beenencoded in intra mode, the following may apply to X ranging from 0 to1 - When X is 0 or current slice is slice B, the following applies to Yranging from X to (1− X). - refPixListLYIvRef, predFlagLYIvRef[x][y],mvLYIvRef[x][y], and refIdxLYIvRef[x][y], respectively, are set to theirrespective corresponding variables, i.e., RefPicListLY,PredFlagLY[x][y], MvLY[x][y], and RefIdxLY[x][y] in the inter-viewreference picture ivRefPic. - If predFlagLYIvRef[xIvRefPb][yIvRefPb] is1, the following may apply to i ranging from 0 tonum_ref_idx_1X_active_minus1 (the number of reference pictures inreference picture list). - If POC (Picture Order Count) ofrefPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]] is the same asRefPicListLX[i] and centerPredFlag is 0, the following applies.  spMvLX[xBlk ][ yBlk ] = mvLYIvRef[ xIvRefPb ][ yIvRefPb ]  spRefIdLX[ xBlk ][yBlk ] = i  spPredFlagLX[ xBlk ][ yBlk ] = 1  curAvailableFlag = 1 - Thefollowing applies according to curAvailableFlag. - If curAvailableFlagis 0, the following applies to X ranging from 0 to 1.  spMvLX[ xBlk ][yBlk ] = mvLXZero  spRefIdxLX[ xBLk ][ yBlk ] = refIdxLXZero spPredFlagLX[ xBlk ][ yBlk ] = availableFlagLXZero - VariablecurSubBlockIdx is set to curSubBlockIdx+1.

Embodiment 3 is described again based on Table 4. The variables in Table3 are the same as those in Table 2.

The inter prediction module 2100 performs initialization before derivingmotion information on a current sub prediction unit using a subprediction unit of a reference block. The initialization is the same asthat described above in connection with Table 2.

Further, the variables, availableFlagLXZero, mvLXZero, and refIdxLXZero,are set as in Equations 23 and 24. Here, X is 0 or 1.

availableFlagL0Zero=1

mvL0Zero=(0,0)

refIdxL0Zero=0  [Equation 23]

availavleFagL1Zero=1

mvL1Zero=(0,0)

refIdxL1Zero=0  [Equation 24]

Here, availableFlagLXZero means an identifier regarding whether thedefault motion information is available, mvLXZero the default motioninformation, and refIdxLXZero the reference index of the default motioninformation.

After setting the variables as above, the inter prediction module 2100performs the following process on yBlk that ranges from 0 to(nPbH/nSbH−1) and xBlk that ranges from 0 to (nPbW/nSbW−1). Here. xBlkmeans the x coordinate of the block, and yBlk means the y coordinate ofthe block.

First, the inter prediction module 2100 initializes the information foridentifying whether to predict motion information front a sub predictionunit of the reference block, the sub prediction unit prediction Hag.motion information on the sub prediction unit, and reference index ofthe sub prediction unit. The initialization is the same as thatdescribed above in connection with Table 2.

The position (xRef. yRef) of the reference block is reset as shown inEquation 25 on a per-sub prediction unit basis.

xRef=Clip3(0,PicWidthInSamplesL−1,xPb+xBlk*nSbW+nSbW/2+((mvDisp[0]+2)>>2)))

yRef=Clip3(0,PicHeightInSamplesL−1,yPb+yBlk*nSbH+nSbH/2+((mvDisp[0]+2)>>2)))  [Equation25]

In case the inter-view reference block is encoded in intra mode, theinter prediction module 2100 may perform the following process on X thatranges from 0 to 1.

When X is 0 or the current slice is slice B, each variable is reset forY (Y ranges from X to (1−X)) as described above in connection with Table2.

In this case, if predFlagLYIvRef[xIvRefPb][yIvRefPb] is 1, the followingEquation 26 may apply to i ranging from 0 tonum_ref_idx_lX_active_minus1(the number of reference pictures in thereference picture list).

spMvLX[xBlk][yBlk]=mvLYIvRef[xIvRefPb][yIvRefPb]

spRefIdxLX[xBlk][yBlk]=i

spPredFlagLX[xBlk][yBlk]=1

curAvailableFlag=1[Equation 26]

After performing the above-described process, in case curAvailableFlagis 0, the inter prediction module 2100 may apply Equation 27 to Xranging from 0 to 1.

In other words, in case motion information cannot be derived from thesub prediction unit of the reference block, the inter prediction module2100 may derive motion information on the sub prediction unit of thecurrent block from the arbitrarily set default motion information.

spMvLX[xBlk][yBlk]=mvLXZero

spRefIdxLX[xBlk][yBlk]=refIdxLXZero

spPredFlagLx[xBlk][yBlk]=availableFlagLXZero  [Equation 27]

Finally, after all of the above-described processes have been done,variable. curSubBlockIdx, is set to curSubBlockIdx+1, and ifavailableFlagL0InterView and availableFlagL1Interview are 0. the processof deriving motion information according to embodiment 3 is ended.

FIG. 26 is a view illustrating an exemplary process of deriving motioninformation on a sub prediction unit of a current block using somemotion information.

Referring to FIG. 26, the blocks positioned at the upper end of FIG. 26mean sub prediction units of the reference block, and the blockspositioned at the lower end of FIG. 26 mean sub prediction units of thecurrent block. Further, default motion information is stored in astorage space. Here, the default motion information shown in FIG. 26 maymean default motion information arbitrarily set according to embodiment3.

Upon deriving the motion information on the sub prediction unit of thecurrent block using the default motion information, each sub predictionunit in the reference block may utilize the default motion informationthat is arbitrarily set. In other words, motion information on theplurality of sub prediction units of the current block may besimultaneously derived using the default motion information, and theplurality of sub prediction units of the current block may address theissue of data dependency. Accordingly, upon use of default motioninformation with some value, the inter prediction module 2100 may derivemotion information in parallel.

As described above, according to embodiment 3, the inter predictionmodule 2100 derives motion information using the default motioninformation with a value. Accordingly, the motion information derivingmethod according to embodiment 3 enables independent derivation ofmotion information on each sub prediction unit in the reference block.In other words, embodiment 3 does not require sequential discovery ofsub prediction units from which motion information may be derived inorder to find sub prediction units from which motion information may bederived, and in case the first sub prediction unit of the referenceblock is impossible to use for deriving motion information, embodiment 3derives motion information on the sub prediction unit of the currentblock using predetermined motion information. As such, the motioninformation derivation according to embodiment 3 removes datadependency, enabling parallelized derivation of motion information oneach sub prediction unit. Further, the motion information derivationaccording to embodiment 3 prevents additional memory access in contrastto existing motion information deriving methods, thus reducing thenumber of times of accessing the memory.

FIG. 27 is a view schematically illustrating times required to derivemotion information according to the present invention.

Referring to FIG. 20, when the time taken to derive motion informationfrom one sub prediction unit is T, and the number of sub predictionunits in a reference block is N, the time taken to derive all the motioninformation from the reference block is NxT. However, upon derivingmotion information according to an embodiment of the present invention,the motion information derivation may be parallelized, and thus, thetime of deriving motion information corresponds to T and a 3D imageencoding/decoding delay is reduced.

The above-described embodiments may have different applicable rangesdepending on block sizes, coding unit (CU) depths, or transform unit(TU) depths. As the variable for determining an applicable range, avalue predetermined in the encoder/decoder or a value determinedaccording to a profile or level may be used, or if the encoder specifiesa variable value in the bitstream, the decoder may obtain the variablevalue from the bitstream.

For example, in case different applicable ranges apply depending on CUdepths, there may be a scheme (method A) in which it applies only to agiven depth or more, a scheme (method B) in which it applies only to thegiven depth or less, or a scheme (method C) in which it applies to thegiven depth only. In case the methods according to the present inventionapply to none of the depths, an indicator (flag) may be used to indicatethe same, or it may be indicated with a CU depth that the methodsaccording to the present invention do not apply, where the CU depth maybe set to be larger than the maximum depth that the CU may have.

TABLE 5 Depth of CU (or PU or TU) representing applicable range Method AMethod B Method C 0 X 0 0 1 X 0 0 2 0 0 0 3 0 X X 4 or more 0 X X

In the above-described embodiments, the methods are described based onthe flowcharts with a series of steps or units, but the presentinvention is not limited to the order of the steps, and rather, somesteps may be performed simultaneously or in different order with othersteps. It should be appreciated by one of ordinary skill in the art thatthe steps in the flowcharts do not exclude each other and that othersteps may be added to the flowcharts or some of the steps may be deletedfrom the flowcharts without influencing the scope of the presentinvention.

Further, the above-described embodiments include various aspects ofexamples. Although all possible combinations to represent variousaspects cannot be described, it may be appreciated by those skilled inthe art that any other combination may be possible. Accordingly, thepresent invention includes all other changes, modifications, andvariations belonging to the following claims.

The above-described methods according to the present invention may beprepared in a computer executable program that may be stored in acomputer readable recording medium, examples of which include a ROM, aRAM, a CD-ROM, a magnetic tape, a floppy disc, or an optical datastorage device, or may be implemented in the form of a carrier wave (forexample, transmission through the Internet).

The computer readable recording medium may be distributed in computersystems connected over a network, and computer readable codes may bestored and executed in a distributive way. The functional programs,codes, or code segments for implementing the above-described methods maybe easily inferred by programmers in the art to which the presentinvention pertains.

Although the present invention has been shown and described inconnection with preferred embodiments thereof, the present invention isnot limited thereto, and various changes may be made thereto withoutdeparting from the scope of the present invention defined in thefollowing claims, and such changes should not be individually construedfrom the technical spirit or scope of the present invention.

1. A method of decoding an image, the method comprising: deriving motioninformation of a current block; and deriving a prediction sample for thecurrent block based on the motion information of the current block,wherein the deriving motion information of the current block comprises:determining whether a center sub block within a reference block hasmotion information; when the center sub block within the reference blockhas motion information, deriving motion information of sub blocks withinthe current block on a per-sub block basis; and when the center subblock within the reference block does not have motion information,deriving motion information of the current block on a per-block basis,wherein the center sub block corresponds to a center position of thecurrent block, and wherein the motion information includes at least oneof a motion vector and a reference index.
 2. The method of claim 1,wherein the deriving motion information of sub blocks within the currentblock on a per-sub block basis comprises: determining whether a subblock within the reference block has motion information, the sub blockwithin the reference block corresponding to a current sub block withinthe current block; when the sub block within the reference block hasmotion information, deriving motion information of the current sub blockwithin the current block from the sub block within the reference block;and when the sub block within the reference block does not have motioninformation, deriving motion information of the current sub block withinthe current block from the center sub block within the reference block.3. A method of encoding an image, the method comprising: determiningmotion information of a current block; and encoding the motioninformation of the current block, wherein the deriving motioninformation of the current block comprises: determining whether a centersub block within a reference block has motion information; when thecenter sub block within the reference block has motion information,deriving motion information of sub blocks within the current block on aper-sub block basis; and when the center sub block within the referenceblock does not have motion information, deriving motion information ofthe current block on a per-block basis, wherein the center sub blockcorresponds to a center position of the current block, and wherein themotion information includes at least one of a motion vector and areference index.
 4. The method of claim 3, wherein the deriving motioninformation of sub prediction blocks within the current block on aper-sub block basis comprises: determining whether the sub block withinthe reference block has motion information, the sub block within thereference block corresponding to a current sub block within the currentblock; when the sub block within the reference block has motioninformation, deriving motion information of the current sub block withinthe current block from the sub block within the reference block; andwhen the sub block within the reference block does not have motioninformation, deriving motion information of the current sub block withinthe current block from the center sub block within the reference block.5. A non-transitory computer readable recording medium storing abitstream formed by a method of encoding an image, the methodcomprising: deriving motion information of a current block; and derivinga prediction sample for the current block based on the motioninformation of the current block, wherein the deriving motioninformation of the current block comprises: determining whether a centersub block within a reference block has motion information; when thecenter sub block within the reference block has motion information,deriving motion information of sub blocks within the current block on aper-sub block basis; and when the center sub block within the referenceblock does not have motion information, deriving motion information ofthe current block on a per-block basis, wherein the center sub blockcorresponds to a center position of the current block, and wherein themotion information includes at least one of a motion vector and areference index.